I have a collection of keys in this massive flat single array I would like to basically expand that array into a multidimensional one organized by keys - here is an example:
'invoice/products/data/item1'
'invoice/products/data/item2'
'invoice/products/data/item2'
=>
'invoice'=>'products'=>array('item1','item2','item3')
how can I do this - the length of the above strings are variable...
Thanks!
'invoice'=>'products'=>array()
is not valid syntax. Did you mean'invoice'=>array('products'=>array())
? – Lekensteyn Oct 10 '10 at 19:28array('invoice'=>array('products'=>array('data'=>array('item1','item2','item3'))))
? – Gumbo Oct 10 '10 at 20:22