Re: [PHP] Re: String Manip. - Chop Equivalent

2003-11-23 Thread Robert Cummings
On Sun, 2003-11-23 at 20:02, Al wrote: > >From the PHP Manual notes (http://us2.php.net/manual/en/function.chop.php): > > $string = substr("$string", 0, -1); You'd be better off with: $string = substr( $string, 0, -1 ); to avoid unnecessary interpolation overhead. Cheers, Rob. -- .---

[PHP] Re: String Manip. - Chop Equivalent

2003-11-23 Thread Al
>From the PHP Manual notes (http://us2.php.net/manual/en/function.chop.php): $string = substr("$string", 0, -1); Al "Jed R. Brubaker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does PHP have an equivalent to PERL's chop - that is, a way to get rid of > the last character in a

[PHP] Re: String Manip. - Chop Equivalent

2003-11-23 Thread Terence
Jed R. Brubaker wrote: Does PHP have an equivalent to PERL's chop - that is, a way to get rid of the last character in a string? "Hello World" to "Hello Worl" Thanks in advance. this might work, haven't tested it... second param is optional function chop($strSubject, $intWastage = 1) { $strRes