[SOLVED] Simple loop through an array
Posted: Sat Jul 23, 2005 7:17 pm
Perhaps I'm just tired
, but I cannot figure out what I'm doing wrong here:
All it's supposed to do is list all the 'post_id' values from the table. But for some reason, it always starts on the second entry and skips the first. The results are the same even if I change to a different column in the table.
Thanks in advance.
Code: Select all
$results=mysql_query("SELECT post_id FROM $table");
$row=mysql_fetch_array($results);
while ($row=mysql_fetch_array($results)) {
$entry=$row["post_id"];
echo $entry.'<br>';
}Thanks in advance.