Test PHP function nl2br

The PHP function nl2br adds a tag <br> before the breaklines \n, \r, \r\n and \n\r.



The function nl2br does not replace the newlines tags. It only adds a tag <br>.
To replace the newlines before calling the nl2br function, you can use this snippets :
$out = str_replace("\n", "<br />", $text);


 FR     EN  

Copyright 2017 -   Contact us - 2017-12-14 01:23:54