adplus-dvertising
frame-decoration

Question

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

a.

infinite loop

b.

0 1 2 3 4 5

c.

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

d.

no output

Posted under PHP

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 ?