note 102512 added to function.nl2br
| From: | mail at fort-hub dot com | Date: | Fri, 18 Feb 2011 11:54:40 +0000 |
| Subject: | note 102512 added to function.nl2br | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177105@lists.php.net to get a copy of this message | ||
I noticed that I am using an earlier version of PHP which does not recognise the $xhtml parameter in
nl2br(), therefore I am stuck with xhtml line breaks, which I do not want. Thus I made the following
simple function:
<?php
function NlToBr($inString)
{
return preg_replace("%\n%", "<br>", $inString);
}
?>
----
Server IP: 92.48.74.199
Probable Submitter: 87.102.90.148
----
Manual Page -- http://www.php.net/manual/en/function.nl2br.php
Edit -- https://master.php.net/note/edit/102512
Del: integrated -- https://master.php.net/note/delete/102512/integrated
Del: useless -- https://master.php.net/note/delete/102512/useless
Del: bad code -- https://master.php.net/note/delete/102512/bad+code
Del: spam -- https://master.php.net/note/delete/102512/spam
Del: non-english -- https://master.php.net/note/delete/102512/non-english
Del: in docs -- https://master.php.net/note/delete/102512/in+docs
Del: other reasons-- https://master.php.net/note/delete/102512
Reject -- https://master.php.net/note/reject/102512
Search -- https://master.php.net/manage/user-notes.php