Re: the last word of a string??
| From: | Jesse Arnett | Date: | Sun, 12 Aug 2001 20:10:05 +0000 |
| Subject: | Re: the last word of a string?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62331@lists.php.net to get a copy of this message | ||
Susan,
this is how I do it.. give it a shot.
$temp = split(" ",$lastline);
echo $temp[count($temp)-1];
btw, you might look into the stripslashes() function.. this would fix the
problem with the slashes in front of the quotes on your "stream" page.. ;)
groupie.
-Jesse
--
Jesse Arnett jarnett@siscom.net
SISCOM Inc. http://www.siscom.net
Southern Ohio's Superior Internet Service Company
Ph: 937.222.8150.413
----- Original Message -----
From: <zerosumzero@yahoo.com>
To: "Jan Wilson" <corocom@btl.net>; <php-general@lists.php.net>
Sent: Saturday, August 18, 2001 11:01 AM
Subject: Re: [PHP] the last word of a string??
> on 8/12/01 10:17 AM, Jan Wilson at corocom@btl.net wrote:
>
> > The order of arguments above is wrong. It should be:
> > $arr = explode(" ",$lastline);
> >
> > The separator must come before the string. See function.explode.html
> > in the docs.
>
> Strange size of array is still just 1?
>
> Susan
>
>
> --
> susan@futurebird.com
> http://futurebird.diaryland.com