note 24547 deleted from function.in-array by felipe
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
Note Submitter: leighnus at mbox dot com dot au
----
Alternative method to find an array within an array (if your version of php doesn't support array type $needles):
function array_in_array($needle, $haystack) {
foreach ($haystack as $value) {
if ($needle == $value)
return true;
}
return false;
}