Monkuar Posted March 10, 2009 Share Posted March 10, 2009 look: $result = mysql_query("SELECT donorlevel, id, name, desktop FROM ibf_members ORDER BY donorlevel DESC LIMIT 5;") and my html code is: $id = "<a href='forums/index.php?showuser={$row['id']}'>{$row['name']}$lol</a>"; ok so i need a php code that does 1) 2) 3) 4) for each LIMIT XX I DO, and put's it next to the $id, thx Link to comment https://forums.phpfreaks.com/topic/148718-how-do-i-order-numbers-on-result/ Share on other sites More sharing options...
Monkuar Posted March 10, 2009 Author Share Posted March 10, 2009 WOW ROFL!!! all i had to do was add this $counter = $counter + 1; then put $counter before the link so it goes 1 2 3 4 5 for each limit i do on mysql ROFL EPIC WIN I LOVE PHP LULZ <3333333333333 Link to comment https://forums.phpfreaks.com/topic/148718-how-do-i-order-numbers-on-result/#findComment-780891 Share on other sites More sharing options...
redarrow Posted March 10, 2009 Share Posted March 10, 2009 Show your new knowledge as a proper example, nice to here it mate! $counter = $counter + 1; << increment by 1 it means. ++$counter; <<< same result i guess. look at this to brain kill ya. <?php $redarrow=1; $redarrow=$redarrow+1; echo $redarrow; ?> <?php $redarrow=1; ++$redarrow; echo $redarrow; ?> Link to comment https://forums.phpfreaks.com/topic/148718-how-do-i-order-numbers-on-result/#findComment-780892 Share on other sites More sharing options...
redarrow Posted March 10, 2009 Share Posted March 10, 2009 look at this it crazy but it works in the correct way. <?php $array=array("a","b","c","d"); $num=0; echo $array[$num]; echo $array[++$num]; echo $array[++$num]; echo $array[++$num]; ?> result. abcd understandable way. <?php $array=array("a","b","c","d"); echo $array[0]; echo $array[+1]; echo $array[+2]; echo $array[+3]; ?> Link to comment https://forums.phpfreaks.com/topic/148718-how-do-i-order-numbers-on-result/#findComment-780898 Share on other sites More sharing options...
shlumph Posted March 10, 2009 Share Posted March 10, 2009 fuck my life Link to comment https://forums.phpfreaks.com/topic/148718-how-do-i-order-numbers-on-result/#findComment-780912 Share on other sites More sharing options...
Monkuar Posted March 10, 2009 Author Share Posted March 10, 2009 fuck my life u ok man ? lol Link to comment https://forums.phpfreaks.com/topic/148718-how-do-i-order-numbers-on-result/#findComment-780930 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.