$string = str_replace("\\r\\n",'',$string);

if you want to know how you can remove return from a strin in php.

to remove the new line you simple use the str_replace() function in php

here i wrote a simple php file you can create your own so you can see it in action:

open your text editor like notepad, copy and paste this code and save it as wallpaperama.php then upload to your php site and run it with your browser, then you will see how i removed the new lines. removing returns is easy. try it.

<?
$string = 'line 1:
  line 2:
  line 3:
  line 4:';
echo 'Original $string: <br><textarea cols="40" rows="7">'.$string.'</textarea><br>';
$string = str_replace("\\r\\n",'',$string);
echo '<br>$string without new line: <br><textarea cols="40" rows="7">'.$string.'</textarea>';
?>
OUTPUT:
line 1:line 2:line 3:line 4:


hope that helps