NYCPHP Meetup

NYPHP.org

[nycphp-talk] Loop next/previous offset boundaries in Arrays

Cliff Hirsch cliff at pinestream.com
Thu Oct 6 07:53:58 EDT 2005


In a loop, a common function seems to be comparing a current array value
with the next or prior array value. Seems easy, except for the first and
last loops, which generate undefined offset errors. Is there a "clean"
way to get around this other than testing for the first or last loop
value, which generates a lot of extra code.
 
Cliff Hirsch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20051006/d47e6ff5/attachment.html>


More information about the talk mailing list