php odd even Check if number is odd or even: <?php if ($i % 2) { echo "$i is odd"; } else { echo "$i is even"; } ?>