What will be the output of the following PHP code ?
<?php
$a = array("hi", "hello", "bye");
for (;count($a) < 5;)
{
if (count($a) == 3)
print $a;
}
?>
<?php
$a = array("hi", "hello", "bye");
for (;count($a) < 5;)
{
if (count($a) == 3)
print $a;
}
?>A. ArrayArrayArrayArrayArrayArray….infinitely
B. (“hi”,”hello”,”bye”)(“hi”,”hello”,”bye”)(“hi”,”hello”,”bye”)(“hi”,”hello”,”bye”)…infinitely
C. hihellobyehihellobyehihellobyehihellobyehihellobyehihellobye…..infinitely
D. no output
Answer: Option A

Join The Discussion