string nl2br ( string string ): changes any new line characters found in the data string into
. : nl2br « Utility Function « PHP






string nl2br ( string string ): changes any new line characters found in the data string into
.

 
<?php 
$astring = "Hello\nWorld\n\nHow are you?"; 
echo nl2br ($astring); 

?>
  
  








Related examples in the same category

1.string nl2br ( string str ) inserts a HTML line break (
) before all new line characters
2.Wrapping Text with wordwrap() and nl2br()
3.nl2br() function converts all newline (\n) characters to their HTML equivalent
.
4.convert the newlines to