Advertisements
Advertisements
Question
What will be displayed in a browser when the following PHP code is executed:
<?php
for (Scounter = 20; $counter< 10;
$counter++)
{
echo “Welcome to Tamilnadu “;
}
echo “Counter is: Scounter”;
?>Options
Welcome to Tamilnadu
Counter is: 20
Welcome to Tamilnadu Counter is: 22
Welcome to Tamilnadu Welcome to Tamilnadu Counter is: 22
MCQ
Advertisements
Solution
Counter is: 20
shaalaa.com
Looping Structure
Is there an error in this question or solution?
APPEARS IN
RELATED QUESTIONS
Loops that iterate for fixed number of times is called ______.
Which loop evaluates condition expression as Boolean, if it is true, it executes statements and when it is false it will terminate?
What will be the output of the following PHP code?
<?php
for ($x = -1; $x < 10;--$x)
{
print $x;
}
?>Define Looping Structure in PHP.
List out Looping Structure in PHP.
Write the features Looping Structure.
Write the purpose of Looping Structure in PHP.
Write short notes on Do while Loop.
Explain the process Do while loop.
Explain concepts of for loop with example.
