Use foreach instead of normal array enumaration