| 
 | nl2brInserts HTML line breaks before all newlines in a string Description
   string nl2br
    ( string  $string[, bool$is_xhtml= true
  ] )
   Returns  Parameters
 
 Return ValuesReturns the altered string. Examples
 Example #1 Using nl2br 
<?phpThe above example will output: foo isn't<br /> bar Example #2 Generating valid HTML markup using the  
<?phpThe above example will output: Welcome<br> This is my HTML document Example #3 Various newline separators 
<?phpThe above example will output: This<br /> is<br /> a<br /> string<br /> Changelog
 
 See Also
 
 |