Someone gave me a -1. Not displaying my source code anymore, this has been resolved.
+2
A:
EDIT: this is the line you need to change *EDIT2: subtracted 1 from page as you set 1 to default.*
<td><? echo (($page-1)*20)+$rank++; ?></td>
This will do:
(0*20) + 1 = 1
(0*20) + 2 = 2
...
(0*20) + 20 = 20
(1*20) + 1 = 21
(1*20) + 2 = 22
...
(1*20) + 20 = 40
(2*20) + 1 = 41
(2*20) + 2 = 42
...
(2*20) + 20 = 60
...
(21*20) + 1 = 421
Note: No code provided when this solution was posted
Assuming you are using a for loop of some sort to keep count:
if (!isset($_GET['page']))
{
$page=0;
}
else
{
$page=$_GET['page'];
}
for($i=1; $i<21; $i++)
{
echo '<tr>';
echo '<td>'.($page*20)+$i.'</td>;' //THIS IS THE RANK LINE
//Other fields
echo '</tr>';
}
Gazler
2010-10-04 19:26:39
Thanks alot Gazler:)
Kyle
2010-10-04 19:34:29
I'd remove your source code, someone gave this question a -1, I removed my source code because whoever it is is having a temper tantrum. I appreciate your help Gazler.
Kyle
2010-10-04 19:43:04
No point in editing the correct answer.
webbiedave
2010-10-04 20:54:58