Open Laboratory for Technocrats

Grab the developer role, learn concepts & prepare with senior software engineers to get solutions for problems in a software job. Coding and Programming Solutions crafted for you.

How to check if a number is ODD or Even in PHP?


<?php
/*
 * Description:This function returns true if passed number is divisible by two, false if not
*/
function isEven($number){
    $isEven = false;
    if(is_numeric ($number)){
        if($number%2 == 0)
            $isEven = true;
    }
    return $isEven;
}
?>

Top #3 Articles

Most Read