MySQLi:如何排序制作阶梯

I'm setting up a website based on server voting's. I would like to sort servers votes with mysqli and give them a rank, per example:

1: 88 votes Server1

2: 54 votes Server2

3:34 votes Server3...

I already have my servers and votes in my database, but I can't find the solution to sort them and to give them a rank. It is like:

{rank} : {number of server's vote} {server name}

I already tried this:

    $totalserv = $database->prepare("SELECT COUNT(*) FROM `servers` ");

    $votes = $database->query("SELECT `votes` FROM `servers` ORDER BY votes ASC");

But I don't understand how to make $vote a list and attribute it a rank.

You can try this, change DESC and ASC accordingly

SELECT *  FROM `table` ORDER BY LEFT(`votes`,2) DESC;

Your query

$votes = $database->query("SELECT `votes` FROM `servers` ORDER BY LEFT(`votes`,2) ASC");