PHP interesse |
|
Beste mensen,
ik heb een "Top 50 Users" Lijst gemaakt, alleen nu wilde ik er nummers bij zetten, van 1 t/m 50.., maar hij begint bij 50 en eindigt bij 1, kunnen jullie mij misschien verder helpen??
Het script ziet er als volg uit:
<?
$sql1 = mysql_query("SELECT * FROM users ORDER BY experience DESC LIMIT 50");
$lasts = "SELECT * FROM `users` ORDER BY id DESC LIMIT 50";
$lasts = mysql_query($lasts);
$i=50;
?>
<center><table border=1 bordercolor=#000000 cellpadding=0 cellspacing=0 width=80%>
<th class="title" colspan=4>Top 50 Users</th>
<tr><td>Id</td><td>Username</td><td>Rank</td><td>Family</td></tr>
</tr>
<?
while($nuser = mysql_fetch_array($sql1)){
?>
<tr>
<td><?=$i; ?></td>
<td><a href=index.php?item=view&user=<?=$nuser['id']; ?>><?=$nuser['username']; ?></a></td>
<td><?=$nuser['rank']; ?></td>
<td><?=$nuser['crew']; ?></td>
</tr>
<?
$i--;
}
?>
</table></center>
<? $sql1 = mysql_query("SELECT * FROM users ORDER BY experience DESC LIMIT 50"); $lasts = "SELECT * FROM `users` ORDER BY id DESC LIMIT 50"; $i=50; ?> <center><table border=1 bordercolor=#000000 cellpadding=0 cellspacing=0 width=80%> <th class="title" colspan=4>Top 50 Users</th> <tr><td>Id</td><td>Username</td><td>Rank</td><td>Family</td></tr> </tr> <? ?> <tr> <td><?=$i; ?></td> <td><a href=index.php?item=view&user=<?=$nuser['id']; ?>><?=$nuser['username']; ?></a></td> <td><?=$nuser['rank']; ?></td> <td><?=$nuser['crew']; ?></td> </tr> <? $i--; } ?> </table></center>
Bedankt, bozmafia
|