Posted By

giak on 01/14/10


Tagged

odd even Modulo


Versions (?)

PHP : INT is odd or even


 / Published in: PHP
 

URL: http://www.giacomel.fr

  1. // INT : odd or even > return TRUE or FALSE
  2. function neo_is_odd( $nb ) {
  3. return $nb % 2 == 0 ? false:true;
  4. }

Report this snippet  

You need to login to post a comment.