Hi,
I have a range of start and end dates return from database in while loop
i need to find, how many of them are continuing.
The example return data;
Array ( [start_date] => 2014-09-22 [end_date] => 2014-09-28 )
Array ( [start_date] => 2014-09-15 [end_date] => 2014-09-21 )
Array ( [start_date] => 2014-09-08 [end_date] => 2014-09-14 )
Array ( [start_date] => 2015-04-06 [end_date] => 2015-04-12 )
Array ( [start_date] => 2015-03-30 [end_date] => 2015-04-05 )
Array ( [start_date] => 2015-04-01 [end_date] => 2015-04-06 )
Array ( [start_date] => 2015-04-01 [end_date] => 2015-04-07 )
Array ( [start_date] => 2015-04-01 [end_date] => 2015-04-07 )
expected to find;
Array ( [start_date] => **2014-09-22** [end_date] => 2014-09-28 )
Array ( [start_date] => 2014-09-15 [end_date] => **2014-09-21** )
As the end date of bottom is 2014-09-21 and the next is 2014-09-22 so the dates are continuing without any gaps.
If i find n number of continuing i need to do something.
Could anybody help?
Thank you!