adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code ?
<?php
for ($i == 2; ++$i == $i; ++$i)
    print "In for loop ";
print "After loop\n";
?>

a.

In for loopIn for loopIn for loopIn for loop……infinitely

b.

After for loopAfter for loopAfter for loop……..infinitely

c.

In for loopAfter for loopIn for loopAfter for loopIn for loopAfter for loop…..infinitely

d.

After for loop

Posted under PHP

Answer: (a).In for loopIn for loopIn for loopIn for loop……infinitely

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 ?