note 106790 added to function.array-search

From: Date: Tue, 06 Dec 2011 21:22:22 +0000
Subject: note 106790 added to function.array-search
Groups: php.notes 
Request: Send a blank email to php-notes+get-184959@lists.php.net to get a copy of this message
at user GuardianGI: I think $needle and $eval need to be exchanged for your code to work. This is a simplificated and debuged version of your function: <? function my_array_search($needle, $haystack_array) { foreach($haystack_array as $key => $eval) if(strstr($needle, $eval)) return 1; return 0; } ?> ---- Server IP: 212.124.37.9 Probable Submitter: 78.49.199.32 ---- Manual Page -- http://www.php.net/manual/en/function.array-search.php Edit -- https://master.php.net/note/edit/106790 Del: integrated -- https://master.php.net/note/delete/106790/integrated Del: useless -- https://master.php.net/note/delete/106790/useless Del: bad code -- https://master.php.net/note/delete/106790/bad+code Del: spam -- https://master.php.net/note/delete/106790/spam Del: non-english -- https://master.php.net/note/delete/106790/non-english Del: in docs -- https://master.php.net/note/delete/106790/in+docs Del: other reasons-- https://master.php.net/note/delete/106790 Reject -- https://master.php.net/note/reject/106790 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184959) next »