3
I’d like to bring up the positions. I have no idea how to do it. Below I’ll be giving a demo and my code
<?php
include("./configs/dados.php");
$ranking = "SELECT * FROM usuarios ORDER BY pontos_total Desc LIMIT 3,10";
$limiteranking = mysql_query("$ranking");
while ($ranking = mysql_fetch_array($limiteranking)) {
$nomeran = $ranking['login'];
$pontosran = $ranking['pontos_total'];
?>
<tr style="background:#d3a298">
<th scope="row"><center>4º</th></center>
<td style="color:#383838"><?php echo $nomeran; ?></td>
<td style="color:#383838"><?php echo $pontosran; ?></td>
</tr>
<?php } ?>
*Code only four down. As you can see, I would like it to appear 4th , 5th , 6th
It worked perfectly buddy. But a doubt: the $position++ means it will sum 1 qnd make the loop?
– Victor Eyer
@VME Yes. Every time you loop, that is, list one more user in the ranking, it adds +1 in $position, thus becoming dynamic.
– Alisson Acioli