In this tutorial we will learn Looping Statements in PHP. Looping statements help us to run a piece of code again and again. For example you want to show 1 to 100 on your page. IN normal case you have to write echo 100 time with number to show 1 to 100 on web page. But with the help of loop you can do this task very easily by writing echo for only once. There are three looping statements in PHP.
Now we will learn each looping statement in detail.
for loop: for loop is used to run a piece of code for certain number of times. Check this example. In this example we will write 1 to 10 using for loop.