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
4

php for loop

for($i = 0; $i <=10; $i++){
	echo "The index is $i";
}
Posted by: Guest on July-23-2020

Browse Popular Code Answers by Language