|
Thanks for sharing your solution Rich.
Caleb: He's not tring to create <br />'s, but <p></p> surrounding things where there are 2 newlines and <br />'s where there is only 1 newline, so a bit more is needed. That said, $string = preg_replace("/\r\n/", "<br />", $string); could be replaced with nl2br b/c it occurs after the double newline replacement code.
__________________
Jeremy Miller
Please login or register to view this content. Registration is FREE
|