while syntax php code example
Example 1: while loop php
<?php
$a = 0;
while($a<=5){
echo $a."<br>";
$a++;
}
?>
Example 2: do while php
<?php
$i = 0;
do {
echo $i;
} while ($i > 0);
?>
Example 3: while in php
<?php
echo 'nice';
?>