I just started learning mysql (today) and I figured out how to insert data into a table and how I am learning how to echo the data.
Here is what I have so far:
$email = mysql_query("SELECT * FROM mail") or die (mysql_error());
$row = mysql_fetch_array($email);
echo $row['email'];
This does work, but only echos the first row. How can I echo the 2nd or 3rd? If I just repeat the echo statement it just echos the first row.
EDIT: Ugh this is confusing. I just figured out that if I do like:
$row = mysql_fetch_array($email);
$row = mysql_fetch_array($email);
$row = mysql_fetch_array($email);
3 times, it will display the 3rd array. Why is this?