|
Home
iRate! IceMelon IM Tutorials Headlines CoolSites PHP Functions |
Most Referenced Functions » google_pagerank() » preg_replace() » imagecreatefrompng() » site_pageranks() » imagepng() » imagedestroy() » imagestring() » imagecolorallocate() » htmlentities() » preg_match() » fopen() » header() » getimagesize() » htmlspecialchars() » ob_start() » session_start() » strstr() » preg_match_all() » ob_flush() » strpos() » flush() » setcookie() » str_replace() » array2vars() » nl2br() » preg_split() » ereg() » ereg_replace() » urlencode() » readgzfile() Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m. |
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) |