Must you use a string of the form:
$string = "['key1']['key2']['key3']";
If you can use:
$string = "key1,key2,key3";
then this function might work:
function arrayMultiKey($keystr, $array) {
if (($keys = explode(',', $keystr)) !== false) {
$size = count($keys);
$ret = $array[$keys[0]];
for ($i = 1; $i < $size; $i++) {
$ret = $ret[$keys[$i]];
}
return $ret;
} else {
return false;
}
}
Otherwise you'll have to convert the format.