• 0

[PHP] check to see if variable equals any value in an array.


Question

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

3 answers to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.