Jump to content

[SOLVED] how to check if a variable is in an array


a L p

Recommended Posts

Hello,

 

I am have a newbie question... I have an array that lists specific countries, and I want to have an if statement that that checks to see if a variable set by the user is in that array:

 

if $variable is in $array then { do this }

 

it seems like this has to be something easy... anyone able to point me in the right direction?

 

Thanks,

Andy :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.