function is_odd()
{
global $num;
echo("$num is an odd number
");
}
function is_even()
{
global $num;
echo("$num is an even number
");
}
?>
Conditional Operator
$num = 57;
( $num % 2 != 0 ) ? is_odd() : is_even();
$num = 44;
( $num % 2 != 0 ) ? is_odd() : is_even();
?>