laxplayin24 Posted May 19, 2006 Share Posted May 19, 2006 I have some text that I am getting that has carriage returns in it and i was wondering if there is a way in php to remvoe them from the text. Thanks for the help. Link to comment https://forums.phpfreaks.com/topic/10009-carriage-returns/ Share on other sites More sharing options...
wildteen88 Posted May 19, 2006 Share Posted May 19, 2006 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.