In PHP, is there a short way to compare a variable to multiple values?

in_array() is what I use

if (in_array($variable, array('one','two','three'))) {

Leave a Comment