Does PHP have something similar to IN?

admin

Administrator
Staff member
I like the "IN" function in SQL:
select * from table where id IN(1,3,4,7);

I was wondering if PHP has a similar, compact, way to ask if a variable is any of several values?
I don't like the "switch" syntax. Can never memorize it... ^_^;
 
Back
Top