Re: where is the source is nl2br()?

From: Date: Sat, 03 Mar 2001 01:52:17 +0000
Subject: Re: where is the source is nl2br()?
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-47830@lists.php.net to get a copy of this message
Lucas Rockwell writes: > hi, > > i know the subject of changing the source code for the community at large > is a touchy one, so i want to start off by saying that i want to make this > change for our php implementation for use on our site. > > so, with that said, i would like to modify the nl2br() function so that it > is xhtml 1.0 compliant. can anyone tell me where in the code i can find > this function? > > many thanks in advance. > > -lucas > > ------------------------ > Lucas Rockwell > lr@socrates.berkeley.edu It's in ext/standard/string.c in the PHP 4 source, but it already is XHTML compliant: ~/work/php4 shanna% php -q -a Interactive mode enabled <?php echo nl2br("This is \n a test\n"); This is <br /> a test<br /> ?> ~/work/php4 shanna% php -v 4.0.5-dev Cheers, Torben -- +----------------------------------------------------------------+ |Torben Wilson <torben@php.net> Adcore Finland| |http://www.coastnet.com/~torben http://www.adcore.com| |Ph: 1.604.709.0506 torben@adcore.com| +----------------------------------------------------------------+

« previous php.dev (#47830) next »