Back to lesson
1. Why don't you have to increment a for loop inside the loop itself?
Because the incrementing gets done inside the conditional section of the loop.
For loops increment automatically.
PHP does the incrementing itself.
2. Which uses less code, a for loop or a while loop?
A for loop
A While loop.
3. Where do you initialize your counter in a for loop?
At the end.
Inside the conditional section of the loop.
At the beginning.
Back to the top
© 2017 GoSkills Ltd.
Skills for career advancement