Ok currently I have an array.. It looks something like:
array(
['march'] => array(
'2', '3', '4', '5', '6', '23', '24', '25', '30'
);
);
Just as an example. How would I take those days in that march array, an do this:
03/02/2012 – 03/06/2012
03/23/2012 – 03/25/2012
03/30/2012
Anyone?
You can find the consecutive timespans by looping through your array like so:
For formatting/parsing/printing the dates, however, others’ suggestion to use the built in
timeanddatefunctions are absolutely correct.