do while php
snippet in php

for loop php

user523

<?php
	$fruits = ["apple", "banana", "orange"];
	for($i=0;$i<count($fruits);$i++){
    echo "Index of ".$i."= ".$fruits[$i]."<br>";
    }
  ?>

php loop

user2302


<?php 
for ($x = 0; $x <= 10; $x++)
{

   echo "The number is: $x <br>";
} 
?>  

do while php

user7558


<?php
$i = 0;
do {
    echo $i;
} while ($i > 0);
?>

while loop php

user889

<?php
	$a = 0;
	while($a<=5){
    	echo $a."<br>";
      $a++;
    }
  ?>

php for loop

user9646

for($i = 0; $i <=10; $i++){
	echo "The index is $i";
}

while true php

user1701

while(true) {
 // Infinite Loop
}