$line-out = str_replace(\'\\r\', \'\', str_replace(\'\\n\', \'\', $line-in));
The above works for me but, I saw a [\\n\\r] example somewhere and I
str_replace can be passed an array as:
$line_out = str_replace(array("\r","\n"), '', $line_in);