note 54654 added to function.in-array

From: Date: Mon, 11 Jul 2005 16:42:27 +0000
Subject: note 54654 added to function.in-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-91776@lists.php.net to get a copy of this message
Actually, that should be <?PHP function in_multi_array($needle, $haystack) { $in_multi_array = false; if(in_array($needle, $haystack)) { $in_multi_array = true; } else { foreach ($haystack as $key => $val) { if(is_array($val)) { if(in_multi_array($needle, $val)) { $in_multi_array = true; break; } } } } return $in_multi_array; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.in-array.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+54654 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54654&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54654&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54654&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54654&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54654&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54654&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+54654&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#91776) next »