Is there a way in php to write if $a equals 1 then $b is 2 and $c is 3?
if ($a == 1) $b=2 AND $c=3;
doesn't work. Or do I need to write all three of them separately?
Is there a way in php to write if $a equals 1 then $b is 2 and $c is 3?
if ($a == 1) $b=2 AND $c=3;
doesn't work. Or do I need to write all three of them separately?
Do not use AND
simply separate it with different statement
if ($a == 1) {$b=2; $c=3;}
Your have a syntax problem there. But it's possible :
if ($a == 1) {
$b = 2;
$c = 3;
}