Hi!
I need to work out the difference between two dates:
$todate=$toyear.$tomonth.$today;
$fromdate=$fromyear.$frommonth.$fromday;
Fine
Then I need to start with the from date, and then add a day on to it until I reach the to date.
$days=$todate-$fromdate;
Can anyone help me with this so that it will handle the month changing and/or the year too?
Something like:
for ($counter = 0; $counter < $days; $counter++) {
$bookdate=mysql_dateadd($fromdate, INTERVAL $counter+1 DAY);
}
(That code doesn't work, but I think it's a start???)
Thanks