Q. What will be the output of the following PHP code?
Code:
<?php
function colour()
{
$colors = array("red", "green", "blue", "yellow");
foreach ($colors as $value)
{
echo "$value <br>";
}
}
colour();
?>
β
Correct Answer: (C)
red green blue yellow