if( $val !== "with" && $val !== "from") simple comparison = faster solution... also you want type-safe you could do something like if(!in_array($val, array("from","with"))) but its neither elegant nor fast On Jul 14, 2011 12:22 AM, "Ron Piggott" <ron.piggott@xxxxxxxxxxxxxxxxxx> wrote: