Forum Moderators: coopster
ereg_replace("\n","<br />",$input)
nl2br($input)
str_replace("\n", "<br />", $str);
implode("<br />",explode("\n",$input))
The nl2br [uk2.php.net] function should do the trick.
Failing that you need to use the syntax for a carriage return, rather than a new line. str_replace [uk2.php.net] will do just fine.
$data = str_replace("\r\n", "<br />", $data);
dc