The Code-Bin
nl2br Alternative
Posted by: Stephen | March 4, 2007 @ 1:01pm
Revision 2 - Original post on March 4, 2007 @ 12:53pm

PHP Code



Syntax Highlighting





Author Comments
This is a simple solution to nl2br outputting <br />.
This function will change DOS, Unix, and Mac new lines (\n, \r, and \r\n) into <br>.
Rating


4.39 / 8
928 Votes