Advertisements
Advertisements
Question
Define Looping Structure in PHP.
Definition
Short/Brief Note
Advertisements
Solution
- Looping Structures are useful for writing iteration logics.
- It is the most important feature of many programming languages, including PHP.
- They are implemented using the following categories,
- for Loop
- While Loop
- foreach Loop
- Do While Loop
shaalaa.com
Looping Structure
Is there an error in this question or solution?
APPEARS IN
RELATED QUESTIONS
Which loop evaluates condition expression as Boolean, if it is true, it executes statements and when it is false it will terminate?
for ($ x=0; $ x<5; x++)
echo “Hai”
The above loop executes how many no of times?
What will be displayed in a browser when the following PHP code is executed;
<?php
for ($counter = 10; $counter < 10;
$counter = $counter + 5){
echo “Hello”;
}
?>What will be the output of the following PHP code?
<?php
for ($x = -1; $x < 10;--$x)
{
print $x;
}
?>List out Looping Structure in PHP.
Write Syntax of For loop in PHP.
Write Syntax of while loop in PHP.
Differentiate For each and While loop.
Explain concepts of for loop with example.
Explain working of loops in array.
