br2nl Replace All XHTML/HTML Line Breaks with Newlines in PHP
Posted
by markb
on Stack Overflow
See other posts from Stack Overflow
or by markb
Published on 2010-03-12T21:51:57Z
Indexed on
2010/03/12
22:17 UTC
Read the original article
Hit count: 325
I am looking for the best br2nl function. I would like to replace all instances of
and <br>
with newlines <br />
\n
. Much like the nl2br function but the opposite.
I know there are several solutions in the PHP manual comments but I'm looking for feedback from the SO community on possible solutions.
© Stack Overflow or respective owner