Home »
MCQs »
PHP MCQs
What will be the output of the following PHP code (25)?
100. What will be the output of the following PHP code?
<?php
$x = 10;
while ($x < 10) {
$x++;
echo $x, ",";
}
?>
- Infinite loop
- Error
- 10, 11,
- No output
Answer: D) No output
Explanation:
In the above PHP script, the condition which is written in the while statement is false. Thus, the loop will not be executed and nothing will print.