PHP function that inserts HTML line breaks before all newlines in a string
PHP function that inserts HTML line breaks before all newlines in a string
string nl2br ( string $string [, bool $is_xhtml = true ] )
Returns string with <br />
or <br>
inserted before all newlines (\r\n
, \n\r
, \n
and \r
).
Documentation: https://php.net/manual/en/function.nl2br.php