How can I simplify this code which validates multi-dimensional arrays before accessing one of its values?
<?php
function some_function($a) {
if (isset($a) &&
isset($a['container']) &&
isset($a['container']['level1']) &&
isset($a['container']['level1']['item1']) {
print $a['container']['level1']['item1'];
}
}
?>
Is there a simpler or better way to check that the keys exist?