I need my script to tell me if a variable is numeric, and if it is, whether or not it's an even number. My code thus far:
$Numbers = array("1", 2, "three", 4, 5, "six");
foreach ($Numbers as $Value) {
if (is_numeric($Value)) {
if ($Value % 2 == 0) {
echo "$Value is numeric, and even";
} else {
echo "$Value is numeric, but not even";
}
} else {
echo "$Value is not numeric";
}
My browser is displaying a blank page.
Any help would be greatly appreciated.