note 106790 deleted from function.array-search by danbrown

From: Date: Sun, 11 Dec 2011 19:18:21 +0000
Subject: note 106790 deleted from function.array-search by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-185047@lists.php.net to get a copy of this message
Note Submitter: skapa_flow ---- 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; } ?>

« previous php.notes (#185047) next »