is there any way of evaluating whether $i is an even or odd number? - I'm talking easy function in PHP, I can code the long way but I can't be arsed at the moment ***************************************
Party on, dudes!
A snippet to prove my theory
<?php
$i=0;
while ($i < 10)
{
echo "$i";
if ($i%2) {
echo "Number is Odd<hr>";
} else {
echo "Number is Even<hr>";
}
$i++;
}
?> ***************************************
Party on, dudes!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.