The code is so horrible, it’s gone a full circle and become amazing once again. It’s a method of finding if you’re on the last iteration of a foreach loop. As with anything that uses array pointers in PHP, be careful how you use it as the results may not be as expected:
Horribly amazing PHP – check if you’re on the last iteration of a foreach loop
Posted by
You’re missing a close bracket on line 6.
Also, there is nothing horrible about this code… it is pure awesome!
Thanks – fixed 🙂