$var1 = ($x == 2)?$var:0;
just re-familiarising myself with this....
im assuming that this above code does the same as
if ($x == 2){
$var1 += $x;
} else {
$var1 += 0;
};
OR
if ($x == 2){
$var1 = $x;
} else {
$var1 = 0;
};
anyone want to confirm either?