Answers for "for php =+"

PHP
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
1

for i php

<?php
  
  for ($i = 1; $i <= 10; $i++) {
    echo $i;
  }
Posted by: Guest on January-26-2021

Browse Popular Code Answers by Language