note 62211 added to function.in-array

From: Date: Wed, 22 Feb 2006 15:11:26 +0000
Subject: note 62211 added to function.in-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-104225@lists.php.net to get a copy of this message
Sorry, that deep_in_array() was a bit broken. <? function deep_in_array($value, $array) { foreach($array as $item) { if(!is_array($item)) { if ($item == $value) return true; else continue; } if(in_array($value, $item)) return true; else if(deep_in_array($value, $item)) return true; } return false; } ?> ---- Server IP: 193.219.81.76 Probable Submitter: 84.240.36.236 ---- Manual Page -- http://www.php.net/manual/en/function.in-array.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+62211 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+62211&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+62211&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+62211&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+62211&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+62211&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+62211&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+62211&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+62211&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#104225) next »