ExamVeda
Login
Home
Control Structures(Loop in PHP)
?

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

Answer & Solution
Correct Answer: Option A
The loop ends when i becomes 0.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.