I have a text column in MySQL that is populated and updated via a HTML form. When I retrieve the text from MySQL via PHP I can use nl2br fine but if I try to use str_replace PHP will not find the new lines. I have tried looking for "\n", "\r", "\r\n\" and even "\t" but nothing works. I can use MySQL's REPLACE function in the SQL query and it will find those characters. Here is the code...
function encode_datafeed($content)
{
$content_new = str_replace('\n',' ',$content);
return $content_new;
}
It seems to me that PHP maybe encoding the text string or that there is some sort of encoding issue. Any suggestions?