-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
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
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
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
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]
> >
}
}
else {}
$ce++;
}
}
// end of my stuff
Thanks,
-Mike
> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 21, 2002 8:
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
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
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.
>
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
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
> $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
> 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
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
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
15 matches
Mail list logo