php check if int is odd
snippet in php

php odd or even

user3507

$num = 34;
if ($num % 2 == 0) {
  print "It's even";
}

How to check even or odd number in php

user3958

$num=85;
if($num%2 ==0){
echo "this is even number";

}else{
echo "this is odd number";
}

php check if int is odd

user5443

$number = 15;
if ($number % 1 == 0) {
    echo "It's even";
}else{
    echo "oneven";
}