We are going to talk about all looping statements in PHP. We have four looping methods.
I. While loop
II. Do … While loop
III. For loop
IV. Foreach loop
Most of PHP statements are similar to C statements. So, a programmer who knows C, can learn PHP easily.
I. While Loop
While statement loops the operations while specified conditions are true. So, we can use this looping method when you don’t have or don’t know number of repetitions.
Structure 1.0 :
1 2 3 4 5
| while( conditions ){
//…
//operations
//…
} |
There is a simple code example that shows us how to use Click to Read Complete Article »
There are three methods for making a loop with JavaScript. There is a list of all loop structures in JavaScript:
I. While loop
II. Do … While loop
III. For loop
I. While Loop
This statement can be very useful if you don’t have or don’t know number of repetitions because it loops the operations while specified conditions are true.
Structure 1.0 :
1 2 3 4 5
| while( conditions ){
//…
//operations
//…
} |
There is a simple code example that shows us how to use Click to Read Complete Article »
There are three methods for making a loop with C. There is a list of all loop structures in C:
I. While loop
II. Do … While loop
III. For loop
I. While Loop
This statement can be very useful if you don’t have or don’t know number of repetitions because it loops the operations while specified conditions are true.
Structure 1.0 : Via this structure, the condition will be evaluated before the loop begin. If conditions are false then loop will be skipped else operations are executed then the conditions will be evaluated again. If conditions are still true then it will execute the operations again…
1 2 3 4 5
| while( conditions ){
...
operations
...
} |
There is a simple code example that shows us how to use Click to Read Complete Article »
We are going to talk about doing loops with ASP. There are many different methods to make a loop with ASP and we should choose the best way. There is a list of all looping statements in asp:
I. Do … Loop Statement
II. While … Wend Statement
III. For … Next Statement
IV. For Each … Next Statement
I. Do … Loop Statement
This statement can be very useful if you don’t have or don’t know number of repetitions because it loops the operations until or while specified conditions are true.
1.1 ) Do While Conditions Are True
The While keyword repeats operations while conditions are true. We make our operations by using the while keyword after do or after loop statements. Every do statement have to be closed with loop statement.
Structure 1.0 : If we use while keyword near do statement, Click to Read Complete Article »
Recently Typed