if ( $var1 == 1 and $var2 == 2 ) { doSomething(); }