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:[EMAIL PROTECTED]
> 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
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php