Predict the output of the below code snippet.

<?php
$colors = array("red"=>10, "green"=>3, "blue"=>5, "yellow"=>20,"red"=>12,"Blue"=>5,"yellow"=>3); 
foreach ($colors as $keys=>$values) {
 echo "$keys:$values#"; 	}
?>

red:10#green:3#blue:5#yellow:20#red:12#Blue:5#yellow:3#

red:12#green:3#blue:5#yellow:3#Blue:5#

$keys:$values#$keys:$values#$keys:$values#$keys:$values#$keys:$values#

$keys:$values#$keys:$values#$keys:$values#$keys:$values#$keys:$values#$ keys:$values#$keys:$values#

Verified Answer
Correct Option - b

To get all Infosys Certified PHP Associate Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in