A) Non ho capito il problema?
B) In futuro posta il codice usando i tasti [CODE] o [PHP]