note 22488 deleted from function.nl2br by didou
| From: | didou@php.net | Date: | Fri, 01 Aug 2003 15:30:53 +0000 |
| Subject: | note 22488 deleted from function.nl2br by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53152@lists.php.net to get a copy of this message | ||
Note Submitter: webmaster@nemas.net
----
I'm glad I found this!! I was strugling to find a way to get textarea strings inserted into a
MySQL database to obey line breaks when displayed for public use....and this did it. I had already
tried AddSlashes and several other things that didn't work.
Quite simple actually....
$text = nl2br($text) ;
echo $text ;
does the trick.
James