svn: /phpdoc/en/trunk/reference/var/functions/ isset.xml

From: Date: Tue, 26 Apr 2011 20:02:13 +0000
Subject: svn: /phpdoc/en/trunk/reference/var/functions/ isset.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-8008@lists.php.net to get a copy of this message
salathe Tue, 26 Apr 2011 20:02:13 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=310529 Log: add examples of 2nd/3rd array depths for isset() (doc #54251) Bug: http://bugs.php.net/54251 (Open) undocumented: isset checks multidimensional at each depth Changed paths: U phpdoc/en/trunk/reference/var/functions/isset.xml Modified: phpdoc/en/trunk/reference/var/functions/isset.xml =================================================================== --- phpdoc/en/trunk/reference/var/functions/isset.xml 2011-04-26 19:29:41 UTC (rev 310528) +++ phpdoc/en/trunk/reference/var/functions/isset.xml 2011-04-26 20:02:13 UTC (rev 310529) @@ -114,7 +114,7 @@ <![CDATA[ <?php -$a = array ('test' => 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 @@ // 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 + ?> ]]> </programlisting>

« previous php.doc.cvs (#8008) next »