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 colour()
{ 
    $colors = array("red", "green", "blue", "yellow"); 
    foreach ($colors as $value)
    {
        echo "$value <br>";
    }
}
colour();
?>

  1. red
    green
    blue
    yellow
  2. green blue yellow red
  3. red blue yellow green
  4. red green yellow blue

All Answers

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

(a).red
green
blue
yellow

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 ...