Remove line breaks and add BR tags in PHP
Posted
by user201140
on Stack Overflow
See other posts from Stack Overflow
or by user201140
Published on 2010-05-11T17:46:13Z
Indexed on
2010/05/11
17:54 UTC
Read the original article
Hit count: 176
I have the following text for which I would like to add a <br>
tag between every paragraph. And also remove all the line breaks. How would I do this in PHP? Thanks.
So this -
This is some text
for which I would
like to remove
the line breaks.
And I would also
like to place
a b> tag after
every paragraph.
Here is one more
paragraph.
Would become this -
This is some text for which I would like to remove the line breaks.<br/> And I would also like to place a br tag after every paragraph. <br> Here is one more paragraph.
NOTE: Ignore the highlighting of any letters.
© Stack Overflow or respective owner