I want to access a specific array\'s property by using a separate array as the path. The problem is the property in question may be at any depth. Here\'s an example...
A simple loop should work:
Update: sorry did check my code
foreach($path as $id) { $data = $data[$id]; } echo $data;
Result:
deeper_value
This will overwrite the $data array so you might want to make a copy of $data first like David did in his example.
$data