E allora col ciclo foreach() che vuoi fare?

Comunque, la soluzione per non averle animate te l'ho già detta.