'for' is replaced with 'foreach'