added shorthand version of php foreach loop