note 28776 deleted from function.nl2br by didou
| From: | didou@php.net | Date: | Fri, 01 Aug 2003 15:30:05 +0000 |
| Subject: | note 28776 deleted from function.nl2br by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53151@lists.php.net to get a copy of this message | ||
Note Submitter: islet8@islet8.com
----
[Editor's Note]
Please use <br /> instead of <br> for XHTML 1.0 compliancy
[/Note]
What eightraks said were perfect!! My example is:
nl2br: $textfield = ereg_replace("(\r\n|\n|\r)", "<br>", $textfield);
br2nl: $textfield = ereg_replace("<br>", "\r\n", $textfield);