Is there a better way of this, using arrays?
paydates is simply:
January 1 2009, January 15 2009
January 16 2009, January 31 2009
... etc
well, actually it is more complex to calculate the paydates, so that's why I would rather have it as a separate manually entered file...
$row = 1;
$paydate_file = $_SERVER['DOCUMENT_ROOT'].'/cals/paydates.csv';
$handle = fopen($paydate_file, "r");
while (($data = fgetcsv($handle, 50, ",")) !== FALSE) {
$today = strtotime("today");
$data[0] = strtotime($data[0]);
$data[1] = strtotime($data[1]);
//match the time and data
if ($today >= $data[0] && $today <= $data[1])
{
$startdate = $data[0];
$enddate = $data[1];
$data = ( $ical->BigDaddy($startdate, $enddate) );
}
}
Much thanks 🙂