Mega Code Archive

 
Categories / Php / Functions
 

String nl2br ( string str ) inserts a HTML line break (br ) before all new line characters

<?     $mystr = "This is a test\nYes it is.";     $brstr = nl2br($mystr); ?>