note 116001 added to function.nl2br

From: Date: Mon, 27 Oct 2014 08:57:54 +0000
Subject: note 116001 added to function.nl2br
Groups: php.notes 
Request: Send a blank email to php-notes+get-200738@lists.php.net to get a copy of this message
Looking for the reverse of the nl2br function? Here is a more succinct way to convert HTML line breaks to newlines (making a slight improvement to http://php.net/nl2br#86678): <?php /** * Convert HTML line breaks to newlines * * @param string The string to convert * @return string The converted string */ function br2nl($string) { return preg_replace('/<br\s*\/?>/i', "\n", $string); } ?> ---- Server IP: 72.52.91.14 Probable Submitter: 94.200.99.202 ---- Manual Page -- http://php.net/manual/en/function.nl2br.php Edit -- https://master.php.net/note/edit/116001 Del: integrated -- https://master.php.net/note/delete/116001/integrated Del: useless -- https://master.php.net/note/delete/116001/useless Del: bad code -- https://master.php.net/note/delete/116001/bad+code Del: spam -- https://master.php.net/note/delete/116001/spam Del: non-english -- https://master.php.net/note/delete/116001/non-english Del: in docs -- https://master.php.net/note/delete/116001/in+docs Del: other reasons-- https://master.php.net/note/delete/116001 Reject -- https://master.php.net/note/reject/116001 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200738) next »