Forum Moderators: coopster
I can get it working at 1 week intervals but the variable I'm using to add to the various days does not evaluate. Here's what I have so far:
$pieces = explode('-', $_POST['myDate']);
for($i=1; $i < 5; $i++)
{
$days = $i * 7;
$interval[$days] = mktime(0, 0, 0, $pieces[0], $pieces[1] + $days, $pieces[2]);
}
When i print the array,
foreach($interval as $key => $value)
I get 1 week increments like this (Based on posting April 1):
7 - 04 08 2009
14 - 04 15 2009
21 - 04 22 2009
28 - 04 29 2009
Clearly the $days value is the correct number, does anyone now how to get mktime() to evaluate it appropriately?