How to use different functions in for each - loop

Please edit your post to use code-tags rather than posting code as plain text.

Thanks.