I have the following:
$values = Array (
['level1'] => Array (
['level2'] => Array(
['level3'] => 'Value'
)
)
)
I also have an array of keys:
$keys = Array (
[0] => 'level1',
[1] => 'level2',
[2] => 'level3'
)
I want to be able to use the $keys array so I can come up with: $values['level1']['level2']['level3']. The number of levels and key names will change so I need a solution that will read my $keys array and then loop through $values until I get the end value.