Probably foreach may be what you want?