DEV Community

Discussion on: The PHP for loop

andersbjorkland profile image
Anders Björkland

I haven't reflected on count being run multiple times. While it probably isn't very resource intensive it's still something I haven't considered. Thanks for that tip!

Also, getting array length always makes me pause for a second. I almost do the JavaScript way and then remember that PHP doesn't have a length property on its arrays. Anyone else?