Ok, heres one for y'all....

I have the user entering a free formed string (such as a search engine
query).. and i want to parse that string into an array of string elements...
If the user enters elements within double quotes, that would appear as one
entity.. for each word outside of containing quotes, it would be treated as
a sole entity..

For instance, the query: house shoe "mother goose" story
would return an array with elements:
[0] => house [1] => shoe [2] => mother goose [3] => story
(note element [2] is multiple word...)

I've been playing with explode($delimiter,$array) but if i use a double
quote there, it will want to split anything up to the first instance into a
sincle entity, then on from there...

any ideas?
--
Aaron



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to