note 11303 deleted from function.in-array by jimw
| From: | jimw@php.net | Date: | Fri, 07 Dec 2001 21:07:25 +0000 |
| Subject: | note 11303 deleted from function.in-array by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-21972@lists.php.net to get a copy of this message | ||
Everywhere you use: search in haystack for needle
--- strstr($hay,$needle) ---
Here you use: search for needle in haystack
--- in_array($needle,$hay) ---
Why switch logic?
Better make a new function like:
array_contains($hay,$neddle)
returning the elements number or false