php determine odd or even number code example
Example 1: php odd or even
$num = 34;
if ($num % 2 == 0) {
print "It's even";
}
Example 2: php check if int is odd
$number = 15;
if ($number % 1 == 0) {
echo "It's even";
}else{
echo "oneven";
}