adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code ?
<?php
$a = array("hi", "hello", "bye");
foreach ($a as $value) 
{
    if (count($a) == 2)
     print $value;         
}
?>

a.

hihellobye

b.

infinite loop

c.

hihello

d.

no output

Answer: (d).no output

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 ?