~Matt~ Posted May 29, 2010 Share Posted May 29, 2010 How do I check the variable against all of the values in the array to see if there is a match? $variable="bird" $array[1]="bird"; $array[2]="fish"; $array[3]="dog"; $array[4]="apple"; $array[5]="tree"; Link to comment Share on other sites More sharing options...
0 ZakO Posted May 29, 2010 Share Posted May 29, 2010 http://uk.php.net/in_array Link to comment Share on other sites More sharing options...
0 andrew_f Posted May 29, 2010 Share Posted May 29, 2010 http://uk.php.net/in_array What a neat solution, I hadn't come across that before now. Link to comment Share on other sites More sharing options...
0 ~Matt~ Posted May 29, 2010 Author Share Posted May 29, 2010 ta Link to comment Share on other sites More sharing options...
Question
~Matt~
How do I check the variable against all of the values in the array to see if there is a match?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts