Join Up!
(PHP 4, PHP 5)
nl2br — Inserts HTML line breaks before all newlines in a string
Returns string with '<br />' inserted before all newlines.
The input string.
Returns the altered string.
Example #1 using nl2br()
<?php echo nl2br("foo isn't\n bar"); ?>
The above example will output:
foo isn't<br /> bar