usa i tag CODE o PHP quando mandi del codice. Il tuo manco l'ho letto.