I am trying to convert a string to an array when, however, I want to create multidimensional arrays when the string has items in brackets.
For example, if the string as passed: (Mary Poppens) Umbrella (Color Yellow)
I would want to create an array that looks like this:
Array ( [0] => Array ( [0] => mary [1] => poppens) [1] => umbrella [2] => Array ( [0] => color [1] => yellow) )
I was able to get the data placed into an array through this:
preg_match_all('/\\(([A-Za-z0-9 ]+?)\\)/', stripslashes($_GET['q']), $subqueries);
But I am having trouble getting the items placed in the multidimensional arrays.
Any ideas?