Jump to content

PHP Rankings


jason97673

Recommended Posts

Eh well actually I have something similar to this. This is my code

while($row = mysql_fetch_array($data))
{
echo  '<tr><td><a href="/data/profile.php?profileID=' .$row['id'] .'">' .$row['first'] .' ' .$row['last'] .'</a></td>';
echo '<td>' .$row['cmp'] .'</td>';
echo '<td>' .$row['att'] .'</td>';
echo '<td>' .$row['cmppct'] .'%</td>';
echo '<td>' .$row['yards'] .'</td>';
echo '<td>' .$row['ypa'] .'</td>';
echo '<td>' .$row['td'] .'</td>';
echo '<td>' .$row['tdpct'] .'%</td>';
echo '<td>' .$row['interceptions'] .'</td>';
echo '<td>' .$row['intpct'] .'%</td>';
echo '<td>' .$row['rating'] .'</td></tr>';
}

 

But I actually want each of the results returned to display the actual NUMBER such as 1, 2, 3, etc.

Link to comment
https://forums.phpfreaks.com/topic/118390-php-rankings/#findComment-609272
Share on other sites

try

 

<ol>
<?php
while($row = mysql_fetch_array($data))
{
echo '<li>';
echo  '<tr><td><a href="/data/profile.php?profileID=' .$row['id'] .'">' .$row['first'] .' ' .$row['last'] .'</a></td>';
echo '<td>' .$row['cmp'] .'</td>';
echo '<td>' .$row['att'] .'</td>';
echo '<td>' .$row['cmppct'] .'%</td>';
echo '<td>' .$row['yards'] .'</td>';
echo '<td>' .$row['ypa'] .'</td>';
echo '<td>' .$row['td'] .'</td>';
echo '<td>' .$row['tdpct'] .'%</td>';
echo '<td>' .$row['interceptions'] .'</td>';
echo '<td>' .$row['intpct'] .'%</td>';
echo '<td>' .$row['rating'] .'</td></tr>';
echo '</li>';
}
?>
</ol>

Link to comment
https://forums.phpfreaks.com/topic/118390-php-rankings/#findComment-609274
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.