Re: string questions
| From: | Danny Shepherd | Date: | Sat, 03 Aug 2002 13:19:26 +0000 |
| Subject: | Re: string questions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-110951@lists.php.net to get a copy of this message | ||
Try,
list($test)=explode(' ',$address);
HTH
Danny
----- Original Message -----
From: "webmaster" <webmaster@harbornet.com>
To: <php-general@lists.php.net>
Sent: Friday, August 02, 2002 5:35 PM
Subject: [PHP] string questions
> I know there has to be an easy way to do this, but I just can't find the
> answer. I need to strip out the first part of a text string. I've
> figured out out to strip out the last part of a string using the
> following:
>
> $address = (4455 N. 45th St.);
>
> $test = strstr($address, " ");
> echo $test;
>
> The variable $test returns N. 45th St. without the 4455. Is there a way
> to reverse this so I can just return 4455?