?
What will be the output of the following PHP code ?
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;
}
?>
Answer & Solution
Correct Answer:
Option
A
As count($a) returns 3 the condition is always true, thus it prints $a, which returns its data type.
Join the Discussion
Login to post a comment or share your explanation.
Login