Forum Moderators: coopster
I've got this text into a field from my DB:
---------//-----------
Kerry issued a statement after Berger stepped down.
Sandy Berger is my friend, and he has tirelessly served his nation with honor and distinction.
---------//------------
So between 'down' and 'Sandy' there are two line breaks, right?
But if I perform this:
$mystr = str_replace("\n\n", "</p><p>", $mystr);
echo $mystr;
There are no "</p><p>" inserted.
Could anybody explain me how to solve this? Thank you very much.
also not sure if you just want breaks, or the <p />'s for formatting, but you could look into the nl2br function.
hth
-sned