while loop inside php function return code example
Example 1: while loop php
<?php
$a = 0;
while($a<=5){
echo $a."<br>";
$a++;
}
?>
Example 2: while true php
while(true) {
// Infinite Loop
}
<?php
$a = 0;
while($a<=5){
echo $a."<br>";
$a++;
}
?>
while(true) {
// Infinite Loop
}