marcus Posted January 6, 2007 Share Posted January 6, 2007 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 More sharing options...
JasonLewis Posted January 6, 2007 Share Posted January 6, 2007 and? if you want it to start at 1 and end at 42 just make it [code=php:0]$i <= $num;[/code]but you didnt really ask a question. Link to comment https://forums.phpfreaks.com/topic/33055-solved-increasing-value/#findComment-154015 Share on other sites More sharing options...
marcus Posted January 6, 2007 Author Share Posted January 6, 2007 Works :D Thanks Link to comment https://forums.phpfreaks.com/topic/33055-solved-increasing-value/#findComment-154025 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.