Jump to content

carriage returns


laxplayin24

Recommended Posts

If you want to remove line breaks/carrage returns then use this:

[code]$var = "This has carriage \r\nreturns in it \r . . . . \n . . .  ";

$var = str_replace(array("\r", "\n"), "", $var);

echo $var;[/code]

\r\n - for windows
\r - for mac
\n - linux/unix
Link to comment
https://forums.phpfreaks.com/topic/10009-carriage-returns/#findComment-37186
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.