RE: [PHP] Chomp, Chomp, Chomp

From: Date: Mon, 23 Jun 2003 13:27:49 +0000
Subject: RE: [PHP] Chomp, Chomp, Chomp
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-152491@lists.php.net to get a copy of this message
Hi, chop and rtrim just take out white space. Perl's chomp takes off the last character no matter what it is. $foo = substr($foo, 0, -1); That will emulate Perl's chomp. -Dan Joseph > -----Original Message----- > From: Sparky Kopetzky [mailto:sparkyk@blackmesa-isp.net] > Sent: Friday, June 20, 2003 6:38 PM > To: PHP General > Subject: [PHP] Chomp, Chomp, Chomp > > > Does anyone have a piece of code that emulates a Perl 'Chomp' > function? I need one. > > Thanks in advance!! > > Robin E. Kopetzky > Black Mesa Computers/Internet Services > www.blackmesa-isp.net > >

« previous php.general (#152491) next »