
What Can I do?
The above code starts a counter ($i) at 1. It then checks to see if the counter is less than or equal to 10. If it’s less than or equal to 10, it prints the number and then performs a counter increment ($i++).
The end result of the code is a list of the numbers 1 through 10.
You control the number of times the loop repeats through the initial counter and the counter increment. As long as the middle condition evaluates to true, the loop executes.