View Full Version : Verify variable in an array

07-22-2013, 05:43 PM
I want to verify if a variable $userid is in array $user.
If the $userid is in the $user array, I want to load an xml file for that $userid.

How is this possible?

I have been searching for an example to do this, but can't seem to find one.

07-22-2013, 05:47 PM
in_array() (http://php.net/manual/en/function.in-array.php) ?

If you Google "find value in array" you will find lots of examples.