I want to search a big string for carraige returns and replace it with <BR>
Any idea on how to do that because ord() just searches for the first Charahter of the string
Thanks.
There's a function nl2br which according to the manual:
"Returns string with '<BR>' inserted before all newlines".
Or you could use
$s2 = str_replace ("\r\n", "<br>", $s1);
This would replace a cr/lf pair.