Im hoping someone can help me with a small problem!
I have a php while loop that loops 3 times.
Each time it loops I want an inner loop to output 2 incremental values per loop.
For example:
Loops the first time: Inner loop should output value 1, value 2
Loops the second time: Inner loop should output value 3, value 4
Loops the third time: Inner loop should output value 5, value 6
any ideas?
What about something like this :
Which gets me the following output :
Basically, here :
$outvariable to keep track of the number of times I’ve been through the outer loop — I only want to loop 3 times$ivariable to control how many times the inner loop loops — two times, each time the outer while loops.$invariable as a global counter, incremented by 1 every time the inner loop loops — this is what I want to output.