判断是否等于

$j = 0;
$l = 5;

if($j == $l){
    echo "相等";
}else{
    echo "不相等";
}

echo "<br>";



判断是否不等于

if($j <> $l){
    echo "不等于";
}else{
    echo "等于";
}





echo "<br>";

并且


$e = 8;

if($j <> $l and $j <> $e){
echo "\$j不等于8和5";
}else{
    echo "\$j等于8和5";
}







或者



echo "<br>";



if($j <> $l or $j == $e){
    echo "\$j不等于5或者等于8";
}else{
    echo "\$j等于5或者不等于8";
}