I think this is a simple question. I need to create an array using a mysql query for a calendar program I am using. The problem is I'm not certain how to create this array using the query.
Here's what I need to produce:
$days = array(
2=>array('/weblog/archive/2004/Jan/02','linked-day'),
3=>array('/weblog/archive/2004/Jan/03','linked-day'),
8=>array('/weblog/archive/2004/Jan/08','linked-day'),
22=>array('/weblog/archive/2004/Jan/22','linked-day'),
);
This array basically tells the calendar program which days have events connected to them and then creates a link. The first number (2,3,8,22) is the day of the month. My query searches the db for all events within the current month. I need to figure out how to add these into the days array and create their own sub array.
If someone can help point me in the right direction I'd appreciate it. Thanks!
Here's what I need to produce:
$days = array(
2=>array('/weblog/archive/2004/Jan/02','linked-day'),
3=>array('/weblog/archive/2004/Jan/03','linked-day'),
8=>array('/weblog/archive/2004/Jan/08','linked-day'),
22=>array('/weblog/archive/2004/Jan/22','linked-day'),
);
This array basically tells the calendar program which days have events connected to them and then creates a link. The first number (2,3,8,22) is the day of the month. My query searches the db for all events within the current month. I need to figure out how to add these into the days array and create their own sub array.
If someone can help point me in the right direction I'd appreciate it. Thanks!