Return if string is in an array
Hey I need a simple function to determine if a given string is contained in an array
$findInMe = Array('SOLD OUT', 'ERROR', 'EXPIRED', 'NO DEAL');
$givenString = somethingFromMyDatabase;
If $givenString was found in $findInMe then the function would return true
Anybody know how to do this?
I appreciate it!
PHP has just the function - in_array($needle, array $haystack) @ http://www.php.net/in_array
thats was ridiculously simple, thanks!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)