note 93158 added to function.nl2br

From: Date: Wed, 26 Aug 2009 05:46:35 +0000
Subject: note 93158 added to function.nl2br
Groups: php.notes 
Request: Send a blank email to php-notes+get-159897@lists.php.net to get a copy of this message
godfrank,your function should be like this, not "(\r\n)",it should be "[\r\n]",right? <?php function nl2brStrict($text, $replacement = '<br />') { return preg_replace("([\r\n]+)", trim($replacement), $text); } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 121.0.29.227 ---- Manual Page -- http://www.php.net/manual/en/function.nl2br.php Edit -- https://master.php.net/note/edit/93158 Del: integrated -- https://master.php.net/note/delete/93158/integrated Del: useless -- https://master.php.net/note/delete/93158/useless Del: bad code -- https://master.php.net/note/delete/93158/bad+code Del: spam -- https://master.php.net/note/delete/93158/spam Del: non-english -- https://master.php.net/note/delete/93158/non-english Del: in docs -- https://master.php.net/note/delete/93158/in+docs Del: other reasons-- https://master.php.net/note/delete/93158 Reject -- https://master.php.net/note/reject/93158 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#159897) next »