Answers for "ii in php loop"

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 loop php increment by 2

for ($i=1; $i <=10; $i+=2) 
{ 
    echo $i.'<br>';
}
Posted by: Guest on February-27-2020

Browse Popular Code Answers by Language