- while loops
- do...while loops
- for loops
- foreach loops
1. While loops is a looping which is use to loop statements if condition is true. Below is basic script of while loops.
while(condition){
statements
}
example:
while(condition){
statements
}
example:
Click show to see and copy this code
Let's see output below.
2. Do...while is a looping same with while loops, but do...while run statements first and check condition after it. Below is basic script of do...while loops.
do{
statements
}
while(condition);
example:
Click show to see and copy this code
Let's see output below.
3. For loops is looping which is total of loops has been determined first. Below is basic script of for loops.
for ( initialization; condition; increment){
statements
}
example:
Click show to see and copy this code
Let's see output below.
4. Foreach let's see my article entitled Array at PHP here. Because foreach related with array.
Thanks fro visiting and reading my article. See you at next my posting...
Learn and learn again...
sheck out java books.gretings from my used bookstore
ReplyDelete