?
What will be the output of the following PHP code ?
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;
}
?>
<?php
for ($i = 0; $i < 5; $i++)
{
for ($j = $i;$j > $i; $i--)
print $i;
}
?>
Answer & Solution
Correct Answer:
Option
D
The second loop does not execute as the check condition is always false.
Join the Discussion
Login to post a comment or share your explanation.
Login