Jump to content

[SOLVED] Increasing Value


marcus

Recommended Posts

I am using a for statement to produce results of top scores

[code]
for($i = 0; $i < $num; $i++){
//while($row = mysql_fetch_assoc($res1)){
$row = mysql_fetch_assoc($res1);
echo "<tr><td class=boardB>$i<td class=boardB><a href='profile.php?player=$row[username]'>$row[username]</a></td><td class=boardB>$row[score]</td></tr>\n";
}
[/code]

When it shows, it starts at 0 then goes to 41. Then if I set $i to 1, it starts at 1 and ends at 41.
Link to comment
https://forums.phpfreaks.com/topic/33055-solved-increasing-value/
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.