I have a start date and an end date I want to loop through each month between those dates and I can't figure out how to do it currently I am echoing my results to the screen to confirm I am getting the right data.
here is my code
the problem is the results only ever return the same value. it does not seem to increament at all.
1, 2004-11
1, 2004-11
1, 2004-11
1, 2004-11
1, 2004-11
any ideas?
Jason Meckley
Web Application Developer
SSIC
here is my code
Code:
while ($e->fetch())
{
$start = strtotime($e->install_date);
$today = strtotime(date('Y-m-d'));
$oeid = $e->Original_Equipment_id;
for ($d = $start; $d <= $today; strtotime($d.' + 1 month'))
{
echo 'equpipment id: '.$oeid.', date: '.date('Y-m', $d).'<br>';
}
}
1, 2004-11
1, 2004-11
1, 2004-11
1, 2004-11
1, 2004-11
any ideas?
Jason Meckley
Web Application Developer
SSIC