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 2021 -   Contact us - 2021-01-26 22:00:42
MUTORI - Création d'applications web et mobiles   par Pierrick Cusset