Page 1 of 1

Check for values in an array

Posted: Thu Jun 15, 2006 3:05 pm
by wbryan6
With my current setup, I have a series of numbers stored in an array, and I want to create an IF statement that will return a statement if my variable is contained within that array string. ie if my array is "1,2,3,4,5", then I want to have "True" returned if "3" is the value being compared against the string. What function can I use to get this result? Thanks.

Posted: Thu Jun 15, 2006 3:08 pm
by John Cartwright

Posted: Thu Jun 15, 2006 3:08 pm
by feyd

Posted: Thu Jun 15, 2006 3:09 pm
by John Cartwright
feyd wrote:in_array()
Jcart 1, Feyd 24323

Posted: Thu Jun 15, 2006 3:10 pm
by wbryan6
You know, I almost feel like an idiot when someone responds that fast. Thanks for the help though.