Prova così:

Codice PHP:
for ($i=$livello_corrente$i>0$i--){
  print 
"$i
"
;