Question
<?php
function colour()
{
$colors = array("red", "green", "blue", "yellow");
foreach ($colors as $value)
{
echo "$value <br>";
}
}
colour();
?>
a.
red
green
blue
yellow
b.
green
blue
yellow
red
c.
red
blue
yellow
green
d.
red
green
yellow
blue
Posted under Functions in PHP PHP
green
blue
yellow
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What will be the output of the following PHP code ?
Similar Questions
Discover Related MCQs
Suggested Topics
Are you eager to expand your knowledge beyond PHP? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!