if ($num_rows > 0)
{
while($row=mysql_fetch_assoc($res))
{
$fromuser=$row['username'];
$comment=$row['comment'];
$commentdate=$row['date'];
$date=strtotime($commentdate);
$final_date=date("g:i a", $date);
$final_date2=date("F j Y", $date);
?>
<table align="center" width="100%"style='border-top: 1px dotted;'bgcolor="#eeeeee" >
<tr><td><?echo "<a href=\"userprofile.php?user=$fromuser\"><b>$fromuser</b></a> commented:\n";?></td></tr>
<tr><td><?echo "at $final_date on $final_date2\n";?></td></tr>
<tr bgcolor="#ffffff"><td><?echo "$comment\n";?></td></tr>
</table><br>
<?
}
}
else
{
echo"There are currently no comments on this user";
}
?>
Je cherche un moyen d'ajouter un nombre à chaque commentaire. Donc 1, 2, 3, 4, etc dans l'ordre DESC. Je ne peux pas penser comment je peux faire ça?ajouter un nombre dans while loop
Ajouter une variable de compteur? –