Monthly Archives: March 2010

Replace line break with

This code is used to replace line break saved in database to
in html display

$astring = str_replace(chr(13) . chr(10), "", $astring);

Updated: Actually there is a built in function for this as follow

echo nl2br($astring);