Probably a stupid question but why does the following loop works ? There is nothing wrong with it I just want to understand how does this code know how many entries I have in database.
$result = mysql_query("SELECT * FROM post_categories");
while ($row = mysql_fetch_array($result)){
echo $row['Name'];
}
And why doesnt this echo all the entries. It echoes the first statement in my database 'Name' row.
$result = mysql_query("SELECT * FROM post_categories");
$row = mysql_fetch_array($result)
echo $row['Name'];
Regards,
Martin