While Loop In PHP
In this tutorial we will learn how to use While Loop In PHP. The meaning of while statement is to tells PHP to execute the nested statement’s repeatedly, till while expression evaluates to true. Value of the expression is checked each time at the beginning of the loop during the execution of the nested statement’s, execution will not stop until the end of the iteration.
Code:
<?php include("Includes/header.php") ?> <div id="main"> <h2>While Statement In PHP</h2> </div> <div style="padding-bottom: 100px"> <?php $count=0; while ($count<=10) { echo $count .", "; $count++; } ?> </div> <?php include("Includes/footer.php") ?>