This is wrong. Foreach return statement of last iteration, so you get only result of last option.