I've been trying to use strtotime() and strftime() to try to take an initial date, like "04-10-2003", and increment the day, so each column is dated from that day to the next 30 days. But right now, it's not printing my initial date, and the incremented days start at the current day. :( I am sure there is a different way to go about this, but I could use some help finding it. This is what I have so far:
$start[0] = "2003-04-11";
$time2 = strtotime($start[0]);
$first = $start[0];
$z = 1;
for($x=100; $x <1000; $x = $x+30)
{
imageline($im, $x, 30, $x, 600, $grey);
imagestring($im, 1, $x-7, 10, strftime("%m/%d",$time2), $black);
$time2 = strtotime("+$z day");
$z++;
}
$start[0] = "2003-04-11";
$time2 = strtotime($start[0]);
$first = $start[0];
$z = 1;
for($x=100; $x <1000; $x = $x+30)
{
imageline($im, $x, 30, $x, 600, $grey);
imagestring($im, 1, $x-7, 10, strftime("%m/%d",$time2), $black);
$time2 = strtotime("+$z day");
$z++;
}
