Answers for "php loop x times"

PHP
0

php loop x times

for ($i = 1; $i <= 10; $i++) {
    echo $i;
}
Posted by: Guest on September-09-2020
10

for loop php

<?php
	$fruits = ["apple", "banana", "orange"];
	for($i=0;$i<count($fruits);$i++){
    echo "Index of ".$i."= ".$fruits[$i]."<br>";
    }
  ?>
Posted by: Guest on December-28-2019

Browse Popular Code Answers by Language