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?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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?