Hey, I would just suggest that you "Explode" the data based on \n and then "walk" through it adding <p> </p> and <br /> tags as necessary.. shouldn't be too diffcult. hth -K On Fri, 21 Jan 2005 14:19:38 -0800, Phillip S. Baker <phillipsbaker@xxxxxxxxx> wrote: > Greetings all, > > Due to style sheet stuff I need to modify the nl2br (IE create or use a > different function). > > I am pulling data from a database and using nl2br, which does the standard. > > 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> > > Again this is because of css and the designer I am workign with. Is there a > built in function that can do something like this or another function out > there. So far I cannot see anything. Or is there a way to view the coding of > the nl2br function so I can create a new function modifying how it does it. > > Just asking so I do not have to create something from scratch. > Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php