Q:

What will be the output of the following PHP code ?

belongs to collection: FUNCTIONS IN PHP MCQ

0

What will be the output of the following PHP code ?

<?php
function start($string)
{
    if ($string < 45)
        return 20;
    else
        return 40;
}
$t = start(90);
if ($t < 20)
{
    echo "Have a good day!";
}
else
{
    echo "Have a good night!";
}
?>

  1. Have a good day!
  2. Have a good night!
  3. ERROR
  4. None of the mentioned

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

(b).Have a good night!

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

FUNCTIONS IN PHP MCQ

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What will be the output of the following PHP code ... >>
<< What will be the output of the following PHP code ...