Replace CRLF with <BR>
Posted: Tue Jul 22, 2003 5:14 pm
I am pulling 'body' text from a table to use in a template and I don't want to have to type the <br> in the actual table text. I would like to handle replacing the CRLF as its pulled from the table and before its put into template. I am trying
$body=eregi_replace("\r\n","<br>",$body);
but the \r\n is where I am screwing up. Can anyone show the correct way to do this?
Thanks---
$body=eregi_replace("\r\n","<br>",$body);
but the \r\n is where I am screwing up. Can anyone show the correct way to do this?
Thanks---