I want to replace escape chars in my string to html chars. For instance "\n\r" to "<br>" for a line break.
$message = "A\r\n\r\nB";
$message = str_replace('\r\n','<br>',$message);
error_log($message);
The output is A\r\n\r\nB and not A<br><br>B.
What is the reason for that?