Help me split up this string

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I need a function that can split up my string by spaces, but with
grouped words based on quotes. For example...

This is "my first" test "query string" to try

should be formatted into an array like...
2=>my first
4=>query string

Anyone have a function like this, or help me determine the best way to
accomplish this? Thanks!

Re: Help me split up this string

Quoted text here. Click to load it

Found the str_getcsv() function which did this for me.
$keywords = str_getcsv($string,' ','"');

Site Timeline