in reply to foreach loop - could it beeeeee!!

Its guessing without seeing original code. Some thoughts:

It would be good to see those nested loops, we would definitely enjoy optimising them.