I want to tokenize a string in PHP that contains quoted strings that should be kept togethe. For example the original string is...
programming php "hello world"
I want the following result...
 hello world
If I use strtok(), split(), or explode() I get
I could write code to look at each character checking for blanks and quote marks, replacing the former with something unique and removing the quotes, then use strtok() or the like, but I thought that maybe there was a built-in PhP function that works like the C command-line parser (or Google) which treats search string like this.
Thanks. I posted this to a forum yesterday, but can't find it and have got no replies.