I have a table mySQL table thats used to store articles along with relevant information such as author, date, headline, etc. I've run a query to retrieve all the info for a certain date.
$query = "SELECT body,headline,author,picture1,picture1caption,mainarticle FROM articles WHERE date= " . $date;
$result = mysql_query($query) or die("Query failed");
for ($count = 1; $row = mysql_fetch_row ($result); ++$count)
{
}
My question is, how can I assign the entries in each row to a variable, so that the body in the first row can be body1, second row would be body2, etc. I was thinking of appending the string $count to the end of $body but I don't know how to implement that. How could I do this or is there another method to achieve the same result?
Thanks in advance.