Check whether a given number is even or odd | Returns true if n is even , else odd ; Driver code
< ? php function isEven ( $ n ) { return ( $ n % 2 == 0 ) ; } $ n = 101 ; if ( isEven != true ) echo " Even " ; else echo " Odd " ; ? >