Trovato! Errore mio vaevo lasciato un

rsort($PUNTEGGI_PILOTI_TOT);

Era un esperimento che non avevo commentato.
Tutto ok
Grazie