note 92612 added to function.nl2br
| From: | post at auge8472 dot de | Date: | Fri, 31 Jul 2009 10:56:24 +0000 |
| Subject: | note 92612 added to function.nl2br | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158947@lists.php.net to get a copy of this message | ||
@leaf at leafo dot net:
Use the array of new line sequences in reversed order. With "\n" before "\r\n"
will you never find the last one. So use array("\r\n"=>"<br
/>","\r"=>"<br />","\n"=>"<br />")
[1] instead.
[1] Additional "\r" for unexpected old Mac OS'sses. Should be irrelevant, but:
"Who knows?".
----
Server IP: 217.13.201.10
Probable Submitter: 92.230.191.172
----
Manual Page -- http://www.php.net/manual/en/function.nl2br.php
Edit -- https://master.php.net/note/edit/92612
Del: integrated -- https://master.php.net/note/delete/92612/integrated
Del: useless -- https://master.php.net/note/delete/92612/useless
Del: bad code -- https://master.php.net/note/delete/92612/bad+code
Del: spam -- https://master.php.net/note/delete/92612/spam
Del: non-english -- https://master.php.net/note/delete/92612/non-english
Del: in docs -- https://master.php.net/note/delete/92612/in+docs
Del: other reasons-- https://master.php.net/note/delete/92612
Reject -- https://master.php.net/note/reject/92612
Search -- https://master.php.net/manage/user-notes.php