Let's suppose that I have the next property available:
$object->nestedArray[0]->prop
I want to access that variable dinamically trough a property like this one:
$prop = 'nestedArray[0]->prop';
var_dump($object->$prop);
But this is not valid, altough it would be valid if $prop
were 'nestedArray'
How can I achieve this? I need to make $prop a valid access (or get a way around).
Here is a live example where you can play: http://ideone.com/vUbSSf