While Loop Statement in PHP

How to use While Loop Statement in PHP

In this article, you will learn How to use While Loop Statement in PHP. While Loop condition is checked at first and iteration will not stop even if the value changes while executing Statements. Syntax: while(condition) { code to be executed } Example: <?php $i=0; while($i<=10) { //output value 0 from 10 echo "The Number […]
Read Full Article
Do While Statement in PHP

Do While Statement in PHP

In this article, you will learn How to Use Do While Looping Statements in PHP. Do while statement in PHP is the same as while statement but the difference is that the condition will check after the run statements. Syntax: do { code to be executed } while(condition); Example: <?php $i=0; do { //output value […]
Read Full Article