in reply to Variable in a foreach loop

Hi ravi45722

Just to set you straight - that's what it's supposed to do...

There's a very subtle difference between declaring your iterator inside and outside the loop.

My advice would be rename your iterator variables to avoid confusion with lexicals outside your loops...

Cheers,
Shadowsong