I am getting the path to a value in PHP, but not sure how to combine the array with a stringed path? The following gives me a value.
var_dump($array['boo']['far'][0]); // works
While none of these give me a valid (or are even valid PHP).
$path = "['boo']['far'][0]";
var_dump($array.$path); // doesn't work
var_dump($array{$path}); // doesn't work
var_dump(eval($array.$path)); // doesn't work
Any ideas?