note 85419 added to function.in-array
| From: | NemoPohle at osu1 dot php dot net | Date: | Fri, 29 Aug 2008 07:32:25 +0000 |
| Subject: | note 85419 added to function.in-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-143968@lists.php.net to get a copy of this message | ||
This is another implementation of the in_arrayr() function found further down below which
didn't really work (it returned upon finding the first nested array and ignoring all other
nested arrays).
function in_arrayr($needle, $haystack, &$found = false) {
foreach ($haystack as $v) {
if ($needle == $v) {
$found = true;
return true;
} elseif (is_array($v)) {
$this->in_arrayr($needle, $v, $found);
}
}
return $found;
}
----
Server IP: 212.124.37.9
Probable Submitter: 195.145.229.170
----
Manual Page -- http://www.php.net/manual/en/function.in-array.php
Edit -- https://master.php.net/note/edit/85419
Del: integrated -- https://master.php.net/note/delete/85419/integrated
Del: useless -- https://master.php.net/note/delete/85419/useless
Del: bad code -- https://master.php.net/note/delete/85419/bad+code
Del: spam -- https://master.php.net/note/delete/85419/spam
Del: non-english -- https://master.php.net/note/delete/85419/non-english
Del: in docs -- https://master.php.net/note/delete/85419/in+docs
Del: other reasons-- https://master.php.net/note/delete/85419
Reject -- https://master.php.net/note/reject/85419
Search -- https://master.php.net/manage/user-notes.php