?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
for ($i++; $i == 1; $i = 2)
print "In for loop ";
print "After loopn";
?>
<?php
for ($i++; $i == 1; $i = 2)
print "In for loop ";
print "After loopn";
?>
Answer & Solution
Correct Answer:
Option
C
The loop runs only once as value of x is incremented.
Join the Discussion
Login to post a comment or share your explanation.
Login