diff --git a/reference/var/functions/isset.xml b/reference/var/functions/isset.xml index 4a07480672..f264071aee 100644 --- a/reference/var/functions/isset.xml +++ b/reference/var/functions/isset.xml @@ -114,7 +114,7 @@ var_dump(isset($foo)); // FALSE 1, 'hello' => NULL); +$a = array ('test' => 1, 'hello' => NULL, 'pie' => array('a' => 'apple')); var_dump(isset($a['test'])); // TRUE var_dump(isset($a['foo'])); // FALSE @@ -124,6 +124,11 @@ var_dump(isset($a['hello'])); // FALSE // If you want to check for NULL key values then try: var_dump(array_key_exists('hello', $a)); // TRUE +// Checking deeper array values +var_dump(isset($a['pie']['a'])); // TRUE +var_dump(isset($a['pie']['b'])); // FALSE +var_dump(isset($a['cake']['a']['b'])); // FALSE + ?> ]]>