I need some help to format a loop... I have a system where all months are splitted into 2 periods, period 1 starts at the 1st., and period 2 starts at the 16th.
I have a start date and a end date and now I want to find all periods between the 2 dates.
Periods date must be rounded down down to 01 or 16.
Example:
$start_day = "2001-11-18"; // period 2001-11-16
$end_day = "2002-03-07"; // period 2002-03-01
I need the loop to echo all periods between the two dates, starting with:
2001-11-16
2001-12-01
2001-12-16
2002-01-01
.....etc ->
2002-03-01
I have played a little with mktime but I can't really think of the format of the loop. Any help would be great.
Thanks,
Michael