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 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 :: format a date sting php 
Php :: wp_localize_script 
Php :: html to pdf in php 
Php :: wp order archive page post by title 
Php :: max title limit woocommerce product 
Php :: wordpress admin redirecting to http 
Php :: while true php 
Php :: how to convert youtube url to embed code in php 
Php :: Access-Control-Allow-Origin php laravel 
Php :: config clear without artisan 
Php :: how to install laravel 
Php :: has password argon2i 
Php :: laravel model wherein update 
Php :: Installing Maatwebsite excel import export package 
Php :: php artisan tinker encription cmd 
Php :: get data from 2 table in response laravel 
Php :: toggle between login and logout buttons php 
Php :: run laravel cron job on cpanel 
Php :: .htaccess Prevent access to php.ini 
Php :: php super global variables 
Php :: php add get to link 
Php :: phpexcel set row height 
Php :: mysql extension php enable 
Php :: define php 
Php :: laravel fontawesome 
Php :: refresh laravel model 
Php :: aws sdk php 
Php :: mysql Cannot pass parameter 2 by reference 
Php :: logout from all the devices in the jwt api laravel 
Php :: How to display custom field in wordpress? 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =