How can i use IF() {} to apply to a variable which can have many possible values, but only for certain values.
So, how could i do... IF )$variable == 1,2 or 3) {do this}
so it works?
Well || is OR and && is AND
This isnt working for me:
if ($cat=="register"||"pretreval"||"login"||"logout"||"editprofile") {echo $print;}
As it works for wherever $cat is
$cat=='register' || $cat=='pretreval' etc.
Might be cleaner (if slower) to just go
if(in_array($cat, array('register', 'pretreval', etc.))) { ... }
though.
woops
thanks 🙂