You might check out http://photomatt.net/scripts/autop

"Call this function on the text you want to convert. Think of this
code like nl2br on steroids. This is basically a cross-platform set of
regular expressions that takes text formatted only by newlines and
transforms it into text properly marked up with paragraph and line
break tags. The line break part can also be turned off if you want."

It's really clean and useful

Sam D

> [snip]
> some text copy<br />
> <br />
> Some more copy<br />
>
> What I want instead is
> <p>Some text copy</p>
>
> <p>some more text copy</p>
> [/snip]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to