You'de be better off using the built in nl2br() function (http://www.php.net/manual/en/function.nl2br.php) it'll have the same effect as a it'll insert a <br> tag everwhere a newline character occurs. Where 2 newline characters occur it will produce <br><br> which in your HTML will break your text in the same way that a <p> tag would.
"James Stewart" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]. .. > Hi, > > I have a form for users of a system I am developing to add their newsletters > to a MySQL database through. I take their input and INSERT it straight into > the database after adding slashes. > > When I retrieve the information from the database I would like to replace > double occurences of new-lines with a <p> tag. Can anyone tell me what > regexp I should be searching for? > > cheers. James. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php