Page 1 of 1

Replace CRLF with <BR>

Posted: Tue Jul 22, 2003 5:14 pm
by jojo2020
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---

Posted: Tue Jul 22, 2003 6:10 pm
by patrikG

Posted: Tue Jul 22, 2003 7:28 pm
by jojo2020
yrpG