Q. What will be the output of the following PHP code ?
Code:
<?php
$arr = array("Hello", "MCQ", "Buddy");
foreach ($arr as $val)
{
if (count($arr) == 2)
print $val;
}
?>
β
Correct Answer: (D)
MCQBuddyHello