How to check even or odd number in php
snippet in php

php odd or even

user2391

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

How to check even or odd number in php

user8104

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

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