[thelist] PHP & arrays

Mark Joslyn mark.joslyn at solimarsystems.com
Tue May 7 12:42:01 CDT 2002

Hello List!

I am trying to search through an array to determine if 4 distinct names
appear in that array. If at least one of the names does not appear in the
array, the error message gets called. But, if one of the names does appear,
the error message is ignored. The in_array function works when there is one
variable, but not multiple ones.

Am I using the wrong function, or is my syntax messed up:

if (!(in_array("Jim" or "John" or "Frank" or "Bob", $myEmailP)))
		error("Please enter a valid employee name.");

Any help would be appreciated.



More information about the thelist mailing list