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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
marcus Posted January 6, 2007 Author Share Posted January 6, 2007 Works :D Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.