I need to parse the input so that quoted text is treated as a phrase and unquoted text is treated as individual words.
the input can be anything in any order e.g.
"hey there" look sit stay "come here"
the array would has to be initialized as
array[1]=hey there;
array[2]=look;
array[3]=sit;
array[4]=stay;
array[5]=come here;
and so on. Using explode("\"",$string) works only if the user is kind enough to input quoted phrases between, before, or after individual words.
I'm digging through my books trying to find info on the preg_match_all function.
Thanks
B