Access php multidimensional array key based on a variable string
- by ggirtsou
I have stored the XML path to items in a string like this: response->items->item.
What I need to do is to access an array called $xml_array like this:
$xml_array['response']['items']['item']
When I write it in the code it works. The thing is that I want it to be done on the fly.
I use this to convert response->items->item to…