DEV Community 👩‍💻👨‍💻

DEV Community 👩‍💻👨‍💻 is a community of 963,864 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in

Discussion on: The PHP for loop

Collapse
 
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?