Cara memeriksa angka genap atau ganjil dalam php
$num = 85;
if($num % 2 == 0){
echo "this is even number";
}else{
echo "this is odd number";
}
nk
$num = 85;
if($num % 2 == 0){
echo "this is even number";
}else{
echo "this is odd number";
}
$num = 34;
if ($num % 2 == 0) {
print "It's even";
}