I want to iterate over my array as many times as I want, so I get an output like this:
1 -> R
2 -> G
3 -> B
4 -> B
5 -> G
6 -> R
7 -> R
8 -> G
9 -> B
10 -> B
...
Till 100
So far I started with this code:
$range = range(1,100);
$color = array("Red", "Green", "Blue");
$clr = 0;
for($i=0; $i<count($range); $i++){
echo "<div style='color :".$color[$clr]."'>".$range[$i]. " " .$color[$clr]. "<br>";
$clr++;
if($clr == 3){
$clr = 0;
}
}