Search
 
SCRIPT & CODE EXAMPLE
 

PHP

How to check even or odd number in php

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

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

php odd or even

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

PHP Even Odd Program

<?php  
$number=1233456;  
if($number%2==0)  
{  
 echo "$number is Even Number";   
}  
else  
{  
 echo "$number is Odd Number";  
}   
?>  
Comment

php check if int is odd

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

check if a number is odd in php

function odd($var)
{
    
    return($var & 1);
}
Comment

PREVIOUS NEXT
Code Example
Php :: laravel order by desc 
Php :: how to find php.ini 
Php :: how to use old for select in blade laravel 
Php :: php convert date and time to iso 8601 
Php :: get id user login laravel 
Php :: show all terms of a custom taxonomy 
Php :: how console log laravel 
Php :: php foreach reverse 
Php :: composer install ignore 
Php :: content-type application/json php 
Php :: specified key was too long; max key length is 767 bytes (s 
Php :: laravel htaccess tested 
Php :: twig replace char 
Php :: php make query string from array 
Php :: laravel request all delete _token 
Php :: laravel blade for loop 
Php :: php date format minus 1 day 
Php :: twig first letter uppercase 
Php :: php dom add class to element 
Php :: php split string at first space 
Php :: wp get image alt 
Php :: woocommerce buy product skip cart 
Php :: laravel https assets 
Php :: codeigniter 3 limit 
Php :: eloquent run seeder 
Php :: laravel storage folder permissions 
Php :: php get current year 
Php :: php throw exception 
Php :: codeigniter get num_rows 
Php :: get last 3 characters of string in php 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =