php do while if else 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);
?>
<?php
$a = 0;
while($a<=5){
echo $a."<br>";
$a++;
}
?>
<?php
$i = 0;
do {
echo $i;
} while ($i > 0);
?>