faqts : Computers : Programming : Languages : PHP : Common Problems : Strings

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

14 of 19 people (74%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

Is there an opposite function of nl2br? Would like to convert <BR> tags to new lines

Sep 1st, 2003 05:32
James Prestwood, Stuart McIntyre, mark romero,


There isn't an easy way to do it, well not as easy as nl2br!
I use the following and it works perfectly:
$string = ereg_replace("<br />+", "\n", $string);