in reply to Re^2: Foreach loop not looping?!
in thread Foreach loop not looping?!

...but the output hasn't changed at all.

Seems hard to believe :)  At least, a pair of outer brackets should've been added to the dump. Otherwise, it all depends on what exactly your @orders array contains (one or more elements, etc.).

Perhaps showing some sample dumps (stripped down) would help shed light on what's going on...