note 52707 added to function.nl2br
| From: | sebastianatnospamflashhilfe dot de at osu1 dot php dot net | Date: | Tue, 10 May 2005 15:16:29 +0000 |
| Subject: | note 52707 added to function.nl2br | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-89213@lists.php.net to get a copy of this message | ||
// Convert only <br> <br /> and <br /> to newline
function br2nl($str) {
return preg_replace('=<br */?>=i', "\n", $str);
}
The Script at the bottom whit '!<br.*>!iU' match tags like <break> or
something.
----
Manual Page -- http://www.php.net/manual/en/function.nl2br.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52707
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52707&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52707&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52707&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52707&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52707&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52707&report=yes
Search -- http://master.php.net/manage/user-notes.php