Re: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-21 Thread Justin French
-Mike > > >> -Original Message- >> From: Darren Gamble [mailto:[EMAIL PROTECTED]] >> Sent: Wednesday, August 21, 2002 10:32 AM >> To: 'Mike At Spy'; [EMAIL PROTECTED] >> Subject: RE: [PHP] Agh! trim (#$@#@^%!!!) >> >> >> Go

RE: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-21 Thread Mike At Spy
e At Spy'; [EMAIL PROTECTED] > Subject: RE: [PHP] Agh! trim (#$@#@^%!!!) > > > Good day, > > Well, for one, you are discarding the results of trim(). > > Check out the online manual page for trim(). The trim'ed string is > returned. It does not say it modifies the

RE: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-21 Thread Darren Gamble
P 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 > -Original Message- > From: Mike At Spy [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 21, 2002 7:12 AM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] Agh! trim (#$@#@^%!!!) > > > > Here

Re: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-21 Thread DL Neil
Mike, What are the character codes of the last few bytes in the string? Please advise, =dn - Original Message - From: "Mike At Spy" <[EMAIL PROTECTED]> To: "Rasmus Lerdorf" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, August 21, 200

RE: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-21 Thread Rasmus Lerdorf
the -1 to -2 and so on, but nothing on that either. :( > > -Mike > > > > > -Original Message- > > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, August 20, 2002 12:45 PM > > To: Mike At Spy > > Cc: [EMAIL PROTECTED] > >

RE: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-21 Thread Mike At Spy
} } else {} $ce++; } } // end of my stuff Thanks, -Mike > -Original Message- > From: Jason Wong [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 21, 2002 8:

Re: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-21 Thread Jason Wong
On Wednesday 21 August 2002 20:36, Mike At Spy wrote: > Get this - it didn't work! :( > > I tried decreasing the -1 to -2 and so on, but nothing on that either. :( Post your exact code which didn't work. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems

RE: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-21 Thread Mike At Spy
ECTED] > Subject: Re: [PHP] Agh! trim (#$@#@^%!!!) > > > Well, perhaps you have something after the . in that string? > > You can strip off the last char of a string very simply with: > >substr($str,0,-1) > > -Rasmus > > On Tue, 20 Aug 2002, Mike At Spy w

RE: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-20 Thread Mike At Spy
IL PROTECTED] > Subject: Re: [PHP] Agh! trim (#$@#@^%!!!) > > > > $single = "The date is 20-Aug-2002." // This is an example - see below > > $trimmed = rtrim($date, "."); > > Where is $date? I think your attempting to trim the wrong string. >

[PHP] Agh! trim (#$@#@^%!!!)

2002-08-20 Thread Mike At Spy
Hey! :) I have an issue with trim / triml. Whenever I put a string in to trimmed, it refuses to take the period at the end of the string off. I did put more things to trim first, but this is basically what I am doing: $single = "The date is 20-Aug-2002." // This is an example - see below $t

Re: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-20 Thread Jeff Lewis
TECTED]> Sent: Tuesday, August 20, 2002 12:53 PM Subject: Re: [PHP] Agh! trim (#$@#@^%!!!) > Trim clears whitespace not characters (I'm pretty sure), try using this to > rid yourself of the period: > > $trimmed = substr($date, 0, -1); // returns everything but that last > c

Re: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-20 Thread Justin French
> $single = "The date is 20-Aug-2002." // This is an example - see below > $trimmed = rtrim($date, "."); Where is $date? I think your attempting to trim the wrong string. This worked for me: To slice off the last character of any string, you could use substr(): Justin French on 21/08

Re: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-20 Thread Rasmus Lerdorf
> Trim clears whitespace not characters (I'm pretty sure), try using this to > rid yourself of the period: You can optionally specify that trim should trim any other chars. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-20 Thread Jeff Lewis
To: <[EMAIL PROTECTED]> Sent: Tuesday, August 20, 2002 12:35 PM Subject: [PHP] Agh! trim (#$@#@^%!!!) > > Hey! > > :) > > I have an issue with trim / triml. Whenever I put a string in to trimmed, > it refuses to take the period at the end of the string off. > > I di

Re: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-20 Thread Rasmus Lerdorf
Well, perhaps you have something after the . in that string? You can strip off the last char of a string very simply with: substr($str,0,-1) -Rasmus On Tue, 20 Aug 2002, Mike At Spy wrote: > > Hey! > > :) > > I have an issue with trim / triml. Whenever I put a string in to trimmed, > it r