Hey Patrick,
hm.. Have you considered using a database? The things you are doing CAN be done in files. However, they are much EASIER to be done ina relational database.
Anyway.. The way I would go ahead with this:
Structure the arrays as one array for all info:
$events = array();
// fill it for a specific date:
if(!array_key_exists($date, $events))
{// This date is new in the array
$events['$date'] = array(
0 => array(
'icon' => 'tticonflow',
'citystate' => 'Santa Monica, CA',
'venue' => 'Details TBD',
'address1' => '',
'address2' => 'Santa Monica, CA',
'phone' => '',
'url' => '',
'dates' => 'May 3-6, 2007',
'phasecolor' => '',
'phase' => '',
'registration' => '',
'times' => '12pm-4pm',
'signup' => 'no'));
}
else
{ // This date already exists, add event
$events['$date'][] = array(
'icon' => 'tticonflow',
'citystate' => 'Santa Monica, CA',
'venue' => 'Details TBD',
'address1' => '',
'address2' => 'Santa Monica, CA',
'phone' => '',
'url' => '',
'dates' => 'May 3-6, 2007',
'phasecolor' => '',
'phase' => '',
'registration' => '',
'times' => '12pm-4pm',
'signup' => 'no');
}
// this is assuming you will fill it using some script. Otherwise you can shorten it:
$events = array();
$events['SOMEDATE'] = array()
$events['SOMEDATE'][] = array(
'icon' => 'tticonflow',
'citystate' => 'Santa Monica, CA',
'venue' => 'Details TBD',
'address1' => '',
'address2' => 'Santa Monica, CA',
'phone' => '',
'url' => '',
'dates' => 'May 3-6, 2007',
'phasecolor' => '',
'phase' => '',
'registration' => '',
'times' => '12pm-4pm',
'signup' => 'no');
}
This would allow you to sort the array (php.net/sort). To get the number of weeks etc you would have to look at the [man]date[/man] functions. I am sure there is somebody on the board however who has a snippet for this. You could try opening a new thread and ask for it, or better yet, do a search on google.