note 62801 added to function.nl2br

From: Date: Thu, 09 Mar 2006 21:49:03 +0000
Subject: note 62801 added to function.nl2br
Groups: php.notes 
Request: Send a blank email to php-notes+get-105169@lists.php.net to get a copy of this message
Seems like I was a bit too quick and left out the vital part, and I also missed to escape the slashes in the post... <?php function br2nl($text) { return preg_replace('/<br\\\\s*?\\/??>/i', "\\n", $text); } ?> ---- Server IP: 129.16.214.50 Probable Submitter: 81.216.110.47 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.nl2br.php Edit -- http://master.php.net/note/edit/62801 Del: integrated -- http://master.php.net/note/delete/62801/integrated Del: useless -- http://master.php.net/note/delete/62801/useless Del: bad code -- http://master.php.net/note/delete/62801/bad+code Del: spam -- http://master.php.net/note/delete/62801/spam Del: non-english -- http://master.php.net/note/delete/62801/non-english Del: in docs -- http://master.php.net/note/delete/62801/in+docs Del: other reasons-- http://master.php.net/note/delete/62801 Reject -- http://master.php.net/note/reject/62801 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#105169) next »