Ask about general coding issues or problems here.
Moderators: macek, egami, gesf
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?
- New php-forum User
- Posts: 12
- Joined: Tue Jan 21, 2003 2:27 pm
Try this one:
- Code: Select all
$row = mysql_fetch_row($result);
echo "- ".$i.": ".$row[$i]."<br>";
- Posts: 387
- Joined: Sat Aug 03, 2002 2:56 am
- Location: Mars
Return to PHP coding => General
Who is online
Users browsing this forum: No registered users and 3 guests