<?
$arr = array(
'testRootKey' => array(
'testKey' => array(
'prop1' => 'works'
)
)
);
$rootKey = 'testRootKey';
$testKey = 'testKey';
$propKey = 'prop1';
$nonExistingPropkey = 'prop2';
echo $arr[ $rootKey ][ $testKey ][ $propKey ]; // -> works
echo "\n";
$arr[ $rootKey ][ $testKey ][ $nonExistingPropkey ] = 'new prop';
echo $arr[ $rootKey ][ $testKey ][ $nonExistingPropkey ]; // -> new prop