fix deprecated foreach syntax
Merge pull request #1 from agarwal/foreach

Fix deprecated foreach syntax