tektipsismyfavorite
Technical User
I have created a calendar with PHP and i have a MySQL query that I would like to loop through the rows as each day is added to the page. I wasn't sure if this post needed to go into the MySQL forum, but what I would like to do is while my days are outputting, i'd like to see if the day of the month matches with the day in my row. I'm just not sure how to put the row into an array, and then increase that array.
I tried $rows = mysql_fetch_array($queryResult);
but then $rows[0] returns the first column, so I'm not entirely sure how to get the next record, once the first one has been outputted.
ie.
How can I do this?
I tried $rows = mysql_fetch_array($queryResult);
but then $rows[0] returns the first column, so I'm not entirely sure how to get the next record, once the first one has been outputted.
ie.
Code:
$r = 0
if($theday == $row[$r]['day']){
echo $row[$r]['event'];
$r++;
}
How can I do this?