PHP Control Structures (Loop)
What will be the output of the following PHP code ?
for ($i = 0; $i < 5; $i++) {
for ($j = $i;$j > $i; $i--)
print $i;
}

0 1 0 1 2 0 1 2 3 0 1 2 3 4 0 1 2 3 4 5 0 1 2 3 4 5
no output
infinite loop
0 1 2 3 4 5

ANSWER DOWNLOAD EXAMIANS APP

PHP Control Structures (Loop)
What will be the output of the following PHP code ?
$a = array("hi", "hello", "bye");
for (;count($a) < 5;) {
if (count($a) == 3)
print $a;
}

ArrayArrayArrayArrayArrayArray….infinitely
(“hi”,”hello”,”bye”)(“hi”,”hello”,”bye”)(“hi”,”hello”,”bye”)(“hi”,”hello”,”bye”)…infinitely
no output
hihellobyehihellobyehihellobyehihellobyehihellobyehihellobye…..infinitely

ANSWER DOWNLOAD EXAMIANS APP