Re: [PHP] Splitting a string first by quotes then spaces

2001-07-09 Thread rm
Try this: first test to see if the query contain quotes, if it does, go to a seperate routine that splits the string into an array, first however, you must make sure there is a space before the query and one after the query ( you add these) *then* split the string into an array, explode on the qu

[PHP] Splitting a string first by quotes then spaces

2001-07-09 Thread Aaron Bennett
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 q