hiyo...
i'm trying to get some text entered into a textarea to nicely wrap itself up with <p></p> tags...my code works nicely...
but...it won't stop...it repeats itself every time i save...
so i get <p><p><p><p><p><p>What?!</p></p></p></p></p></p>
$btext = preg_replace( "/[\n]+/", "\n", $btext );
$btext = "<p>" . str_replace( "\n", "</p><p>", $btext ) . "</p>";
it seems like a common problem...but i can't find a solution...
any idears?
<p><p><p><p><p><p>Thanks!</p></p></p></p></p></p>
<p><p><p><p><p><p>Vaska</p></p></p></p></p></p>