hi,
I am trying to display chart information for a top 20 on a project im doing. ive managed to list the twenty but was wondering if anyone knows how to display numbered rows for which is number one, number two etc. like: -
1.) Metallica
2.)Queen
My code so far is : -
<?php
$page_title = 'Blackpool Tower Records - Charts';
include_once ('header.php');
require_once ('mysql_connect.php');
$query = "SELECT * FROM bands ORDER BY count DESC LIMIT 0 ,20";
echo '<br><table border="0" width="500" cellspacing="3" cellpadding="3" align="center">
<tr>
<td align="center" width="150"><b><font class="text">Top 20 bands</font></td></tr>
<tr>
<td align="center" width="150">';
$result = mysql_query ($query);
while ($row = mysql_fetch_array ($result, MYSQL_BOTH)) {
echo "{$row['band_name']}<br>";
}
echo '</td></tr></table>';
mysql_close();
exit();
?>