I would like to know what's the syntax for a if with more than 1 clause!
I did it this way:
if($var1 == "1") { if($var2 == "2") { print ("🙂"); } }
but when I use a ELSE it is only for the first if.. So does somebody have a suggestion?
Greetings,
Kasper Schoonman
if ($var1=="1" && $var2=="2") { something; } elseif ($var1=="2" && $var2=="3") something; } else { no condition has been fulfiled. }
&& means logical AND || logical OR
or you can code it normally, eg if ($var1 == "1" AND $var2 == "2")