$name){ $state = $i < $cur ? 'done' : ($i == $cur ? 'active' : ''); echo "
".($i+1)."$name
"; } ?>