How do you add more than 1 each time in a foreach/for loop?
I know the basic +1 is like this:
for ($i=1;$i<$nc;$i++){
echo $i;
}
but I need to add another element which goes up by 5 each time also
for ($i=1;$i<$nc;$i++){
// what ever maths to make $plus5 go up by 5 each time
echo $i . ' - ' . $plus5;
}
so the result would be:
1 - 5
2 - 10
3 - 15
4 - 20