/*
This function takes a whole number ($intnumber)
and then displays a message depending on whether
it is odd or even
*/
function OddOrEven($intNumber)
{
if ($intNumber % 2 == 0 )
{
//your number is even
echo "Your number is even
";
}
else
{
//your number is odd
echo "Your number is odd
";
}
}
//test the function with 2 values 40 and 3
OddOrEven(40);
OddOrEven(3);
?>