| Newsgroups |
php.notes |
| Message-ID |
<[email protected]> |
You just did a Control/Command+F to look for multidimensional support and you found this. I'm posting both the key and value on their respective documentation pages.
<?php
function in_multi_array_key($needle, $array)
{//2020-10-05
$r = false;
foreach ($array as $k1 => $v1)
{
if (is_array($v1))
{
$r = in_multi_array_key($needle, $v1);
if ($r) {break;}
}
else if ($k1 === $needle) {$r = true; break;}
}
return $r;
}
?>
----
Server IP: 206.189.2.9
Probable Submitter: 159.26.97.5
----
Manual Page -- https://php.net/manual/en/function.array-key-exists.php
Edit -- https://main.php.net/note/edit/130632
Del: integrated -- https://main.php.net/note/delete/130632/integrated
Del: useless -- https://main.php.net/note/delete/130632/useless
Del: bad code -- https://main.php.net/note/delete/130632/bad+code
Del: spam -- https://main.php.net/note/delete/130632/spam
Del: non-english -- https://main.php.net/note/delete/130632/non-english
Del: in docs -- https://main.php.net/note/delete/130632/in+docs
Del: other reasons-- https://main.php.net/note/delete/130632
Reject -- https://main.php.net/note/reject/130632
Search -- https://main.php.net/manage/user-notes.php