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 (  => Array (  => mary  => poppens)  => umbrella  => Array (  => color  => 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.