I have a MySQL table with field contents containing line breaks and my php code inserts those fields in html like this:
<td onmouseover="$row[0]">
The output is something like this:
<td onmouseover="Field
Contents">
I have tried to use str_replace like this
str_replace("\n","",$row[desc])
and like this
str_replace("
","",$row[desc])
and it doesn't replace anything.
Does anyone know how to remove line breaks from a string?
Thanks,
Chris.