[Solved] Using Logical Operators in PHP if/else [closed]
Use else if. $a = 1; if($a === 1) { // do something } else if ($a === 2) { // do something else } Note that in most case the switch statement is better for that, like: switch($a) { case 1: // do something break; case 2: // do something else break; } or: … Read more