ii in php loop code example
Example 1: for loop php
<?php
$fruits = ["apple", "banana", "orange"];
for($i=0;$i<count($fruits);$i++){
echo "Index of ".$i."= ".$fruits[$i]."<br>";
}
?>
Example 2: for loop php increment by 2
for ($i=1; $i <=10; $i+=2)
{
echo $i.'<br>';
}