Ok I have a table with a few fields. One of the fields is username
. There are many times where the username
is the same, for example:
Use a loop, and use mysql_fetch_array()
instead of row:
while($row = mysql_fetch_array($result)) {
echo "Study: " . $row[1] . " - " . $row[5];
// but now with mysql_fetch_array() you can do this instead of the above
// line (substitute userID and username with actual database column names)...
echo "Study: " . $row["userID"] . " - " . $row["username"];
}