note 73300 added to function.array-search

From: Date: Fri, 16 Feb 2007 17:49:39 +0000
Subject: note 73300 added to function.array-search
Groups: php.notes 
Request: Send a blank email to php-notes+get-123491@lists.php.net to get a copy of this message
php dot net at surfnation dot de's function with a slight mod to correct for axo at axolander dot de's comments: <?php function multiArraySearch($needle, $haystack){ $value = false; $x = 0; foreach($haystack as $temp){ $search = array_search($needle, $temp); if (strlen($search) > 0 && $search >= 0){ $value[0] = $x; $value[1] = $search; } $x++; } return $value; } ?> ---- Server IP: 216.194.113.175 Probable Submitter: 167.21.3.6 (proxied: ICAP/1.0 192.168.1.139) ---- Manual Page -- http://www.php.net/manual/en/function.array-search.php Edit -- https://master.php.net/note/edit/73300 Del: integrated -- https://master.php.net/note/delete/73300/integrated Del: useless -- https://master.php.net/note/delete/73300/useless Del: bad code -- https://master.php.net/note/delete/73300/bad+code Del: spam -- https://master.php.net/note/delete/73300/spam Del: non-english -- https://master.php.net/note/delete/73300/non-english Del: in docs -- https://master.php.net/note/delete/73300/in+docs Del: other reasons-- https://master.php.net/note/delete/73300 Reject -- https://master.php.net/note/reject/73300 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#123491) next »