Advertisements
Advertisements
Question
What will be the output of the following PHP code?
<?php
for ($x = -1; $x < 10;--$x)
{
print $x;
}
?>Options
123456713910412
123456713910
1234567139104
Infinite loop
MCQ
Advertisements
Solution
Infinite loop
shaalaa.com
Looping Structure
Is there an error in this question or solution?
APPEARS IN
RELATED QUESTIONS
The loop exclusively used for arrays is _____.
List out Looping Structure in PHP.
Write Syntax of while loop in PHP.
Explain the use of for each loop in PHP.
Write the features Looping Structure.
Write short notes on Do while Loop.
Differentiate While and Do while loops.
Explain Looping Structure in PHP.
Discuss in detail about Foreach loop.
Explain working of loops in array.
