• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

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

Question

~Matt~    0

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";

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
~Matt~    0

ta

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.