note 130024 added to function.in-array
| From: | pavelschb@gmail.com | Date: | Thu, 13 Feb 2025 15:30:25 +0000 |
| Subject: | note 130024 added to function.in-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221846@lists.php.net to get a copy of this message | ||
So still the best and the easiest is foreach loop in case of arrays in array....
function check_all_keys($haystack) {
foreach ($haystack as $key => $value) {
if (!is_array($value)) {
} else {
check_all_keys($value);
}
}
}
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 89.24.217.207)
----
Manual Page -- https://php.net/manual/en/function.in-array.php
Edit -- https://main.php.net/note/edit/130024
Del: integrated -- https://main.php.net/note/delete/130024/integrated
Del: useless -- https://main.php.net/note/delete/130024/useless
Del: bad code -- https://main.php.net/note/delete/130024/bad+code
Del: spam -- https://main.php.net/note/delete/130024/spam
Del: non-english -- https://main.php.net/note/delete/130024/non-english
Del: in docs -- https://main.php.net/note/delete/130024/in+docs
Del: other reasons-- https://main.php.net/note/delete/130024
Reject -- https://main.php.net/note/reject/130024
Search -- https://main.php.net/manage/user-notes.php