php loop x times
snippet in php

for loop php

user4167

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

php loop x times

user545

for ($i = 1; $i <= 10; $i++) {
    echo $i;
}