adplus-dvertising
frame-decoration

Question

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

a.

In for loop

b.

After for loop

c.

In for loopAfter for loop

d.

Infinite loop

Posted under PHP

Answer: (c).In for loopAfter for loop

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 ?