using nl2br function
nl2br — Inserts HTML line breaks before all newlines in a string
n style="color: #000000;"><?php
style="color: #007700;">echo nl2br("foo isn't\n bar");
?>
The above example will output:
foo isn't<br /> bar
© PHPInterviewQuestion.com 2009 - 2012
Comments