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 2024 -   Contact us - 2024-12-21 13:54:12