(PHP 3, PHP 4, PHP 5)
Returns string with '<br />' inserted before all newlines.
string
The input string.
Returns the altered string.
Example 1. using nl2br()
<?phpecho nl2br("foo isn't\n bar");?>
The above example will output:
foo isn't<br /> bar
Warning: Participation in PHPRO.ORG polls may incorrectly lead you to believe your opinions matter.