如何实现从数据库读取后重新从1到10排序
$query = "select * from software order by cnet_total_downloads limit 10";
$result = mysql_query($query) OR die(mysql_error());
while($row = mysql_fetch_array($result))
{
echo "X.".$row['software_name'];
}
$query = "select * from software order by cnet_total_downloads limit 10";
$result = mysql_query($query) OR die(mysql_error());
while($row = mysql_fetch_array($result))
{
static $i=1;
echo "$i.".$row['software_name'];
$i++;
}