The
nl2br() string function in PHP is used to add HTML line breaks <br /> or <br> where all new line characters (
n ) occur in the string.

<?php
$myString = "This willn add break tags wheren new lines chars are.";
$newString = nl2br($myString);
echo $newString;
?>
This will
add break tags where
new lines chars are.
The source code view looks like this after altering your string:
This function will<br />
add break tags where<br />
new lines chars are.