note 115584 added to function.nl2br

From: Date: Wed, 20 Aug 2014 14:15:44 +0000
Subject: note 115584 added to function.nl2br
Groups: php.notes 
Request: Send a blank email to php-notes+get-200228@lists.php.net to get a copy of this message
Given string in PHP "abc def\n xyz " Desired string "abc<br/>def\n<br/>xyz" If i use nl2br() then i get abc<br/> def\n<br/> xyz If i use str_replace to replace \n to br tag then i lose the \n after f. What should be the solution? ---- Server IP: 72.52.91.14 Probable Submitter: 123.108.35.234 ---- Manual Page -- http://php.net/manual/en/function.nl2br.php Edit -- https://master.php.net/note/edit/115584 Del: integrated -- https://master.php.net/note/delete/115584/integrated Del: useless -- https://master.php.net/note/delete/115584/useless Del: bad code -- https://master.php.net/note/delete/115584/bad+code Del: spam -- https://master.php.net/note/delete/115584/spam Del: non-english -- https://master.php.net/note/delete/115584/non-english Del: in docs -- https://master.php.net/note/delete/115584/in+docs Del: other reasons-- https://master.php.net/note/delete/115584 Reject -- https://master.php.net/note/reject/115584 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200228) next »