Jump to content

FOR LOOP, Question [SOLVED]


smithmr8

Recommended Posts

Im trying to get it to list something, with numbers. Ie.

1. LINE

2. LINE

3. LINE

ect.

This code is making them all '1'. Any ideas ?

 

for ($num=1; $num <= 10; $num++ ){
  while ($money = mysql_fetch_array($mostmoney)) {
    echo $num.". ".$money['username']." (£".$money['money'].")<br>";
}
}

Edit: Solved. 

Had to put $num++; after the echo.

 

 

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/92124-for-loop-question-solved/
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.