|
Home
iRate! Tutorials Headlines CoolSites PHP Functions |
|
Most Referenced Functions » google_pagerank() » preg_replace() » htmlentities() » imagecreatefrompng() » site_pageranks() » imagepng() » imagestring() » imagedestroy() » header() » imagecolorallocate() » preg_match() » session_start() » getimagesize() » urlencode() » ob_start() » flush() » strpos() » str_replace() » htmlspecialchars() » array2vars() » fopen() » nl2br() » setcookie() » preg_match_all() » strstr() » ob_flush() » ereg() » preg_split() » ereg_replace() » var_dump() Our Sponsors » Weblog Community » Listen to Podcasts » Rock Music Community - meet fans Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email Tabpole[AT]Gmail[DOT]com. |
PHP Functions
Function: nl2br (PHP 3, PHP 4, PHP 5) nl2br -- Inserts HTML line breaks before all newlines in a stringDescriptionstring nl2br ( string string )Returns string with '<br />' inserted before all newlines. Note: Starting with PHP 4.0.5, nl2br() is now XHTML compliant. All versions before 4.0.5 will return string with '<br>' inserted before newlines instead of '<br />'.
Example 1. using nl2br()
<?php
echo nl2br("foo isn't\n bar");
?>
this will output : foo isn't<br /> bar Related Function(s) |