note 33202 deleted from function.array-key-exists by torben
| From: | torben@php.net | Date: | Thu, 19 Jun 2003 04:05:57 +0000 |
| Subject: | note 33202 deleted from function.array-key-exists by torben | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-50614@lists.php.net to get a copy of this message | ||
Note Submitter: marco777@bol.com.br
----
If you have an array with 2 indexes, you need to do a double test with the array_key_exists:
$MyArray = array("f1" => array("i1", "i2", "i3"),
"f2" => array("i1", "i2", "i3"))
if(array_key_exists("f1", $MyArray) //return true
if(array_key_exists("i1", $MyArray["f1"]) //return true
print("The pair key ["f1"]["i1"] exist in $MyArray");