Zend - The PHP Company




Math

Add Code


shortest is_even function  

Type: code fragment
Added by: ctaroz
Entered: 14/10/2005
Last modified: 02/12/2005
Rating: - (fewer than 3 votes)
Views: 3254
returns TRUE if the number is even, FALSE if not


<?php
function is_even($number) {
           return 
$number%2==0?TRUE:FALSE;
}
?>


Usage Example




Rate This Script





Search



This Category All Categories