怎么实现从数据库读取后重新从1到10排序

WBOY
Release: 2016-06-13 12:30:24
Original
1462 people have browsed it

如何实现从数据库读取后重新从1到10排序

$query = "select * from software order by cnet_total_downloads limit 10";<br />
$result = mysql_query($query) OR die(mysql_error());<br />
while($row = mysql_fetch_array($result))<br />
{<br />
echo "X.".$row['software_name'];<br />
}
Copy after login


想要的效果就是上面的X怎么变成1,2,3,4,5,6,7,8,9,10

最终显示
1. a
2. b
3. c
.
.
.
10.Z

这个1到10如何实现

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template