Re: Split string
| From: | Richard Lynch | Date: | Wed, 02 May 2007 19:57:19 +0000 |
| Subject: | Re: Split string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-254259@lists.php.net to get a copy of this message | ||
On Wed, May 2, 2007 3:55 am, Lester Caine wrote:
> Can someone with a few more working grey cells prompt me with the
> correct
> command to split a string.
>
> The entered data is names, but I need to split the text up to the
> first space
> or comma into one string, and the rest of the string into a second.
> It's the
> 'first either space or comma' that eludes me at the moment :(
>
> In know it's probably obvious, but it always is when you know the
> answer.
One of these should have an example to get you where you need to be:
http://php.net/split
http://php.net/preg_split
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?