andrisp Posted April 28, 2005 Author Report Posted April 28, 2005 pats kautko atradu function OddOrEven($intNumber) { if ($intNumber % 2 == 0 ) { //paara return TRUE; } else { //Nepaara return FALSE; } }
bubu Posted April 28, 2005 Report Posted April 28, 2005 Var smukāk: $isOdd = $intNumber&1; true(1) - ja nepāra, false(0) - ja pāra.
Recommended Posts