if ($cat != '0' && $cat != '1' && $cat != '2') {$cat = '3';}
if ($cat != '0' && $cat != '1' && $cat != '2') {$cat = '3';}
<?
if($cat != 1) { $cat = '2' }
if($cat != 2) { $cat = '3 }
if($cat != 3) { $cat = '4' }
?>
$cat = ($cat >= 3) ? 3 : null;
$cat == $cat > 2 or $cat < 0 ?? 3;
if ($cat != '0' && $cat != '1' && $cat != '2') {$cat = '3';}
$cat == $cat > 2 or $cat < 3 ?? 3;