note 24547 deleted from function.in-array by felipe

[email protected]
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;
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.