Ask about general coding issues or problems here.
Moderators: macek, egami, gesf
- New php-forum User
- Posts: 12
- Joined: Tue Jan 21, 2003 2:27 pm
I am bringing records from a database to my page using mysql_fetch_row() to display a top 5 list.
The problem is I want to print out the postion at the start of each line, i.e.
I can't work out how to do this using while as it will print out the same value on each line! Can anybody help?
- Posts: 387
- Joined: Sat Aug 03, 2002 2:56 am
- Location: Mars
Try this one:
Code: Select all
$row = mysql_fetch_row($result);
echo "- ".$i.": ".$row[$i]."<br>";
Return to “PHP coding => General”
Who is online
Users browsing this forum: Yahoo [Bot] and 1 guest