note 43636 deleted from function.in-array by tomsommer
| From: | tomsommer@php.net | Date: | Mon, 28 Jun 2004 20:00:08 +0000 |
| Subject: | note 43636 deleted from function.in-array by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72074@lists.php.net to get a copy of this message | ||
Note Submitter: info@eversite.com
----
There are some times when you need to search for the keys in a multidimensional associative array.
Looking around the web for a solutions is very hard. This snippid does the job.
<?php
if (in_array($key1, array_keys($multi_array[$key2]))) {
echo $multi_array[$key2][$key1];
}
?>