3
I’ve got a job to do here and I don’t even know where to start:
I have an array of dates to group:
array (size=12)<br>
0 => string '2016-08-22' (length=10)<br>
1 => string '2016-08-23' (length=10)<br>
2 => string '2016-08-24' (length=10)<br>
3 => string '2016-08-29' (length=10)<br>
4 => string '2016-09-05' (length=10)<br>
5 => string '2016-09-12' (length=10)<br>
6 => string '2016-09-19' (length=10)<br>
7 => string '2016-09-20' (length=10)<br>
8 => string '2016-09-21' (length=10)<br>
9 => string '2016-09-26' (length=10)<br>
10 => string '2016-10-03' (length=10)<br>
11 => string '2016-10-10' (length=10)<br>
I need to divide this array into several arrays organized by month and year, ex:
'datas' =><br>
array(size=3)<br>
-- 0 => array(size=4)<br>
------ 0 => string '2016-08-22' (length=10)<br>
------ 1 => string '2016-08-23' (length=10)<br>
------ 2 => string '2016-08-24' (length=10)<br>
------ 3 => string '2016-08-29' (length=10)<br>
-- 1 => array(size=6)<br>
------ 0 => string '2016-09-05' (length=10)<br>
------ 1 => string '2016-09-12' (length=10)<br>
------ 2 => string '2016-09-19' (length=10)<br>
------ 3 => string '2016-09-20' (length=10)<br>
------ 4 => string '2016-09-21' (length=10)<br>
------ 5 => string '2016-09-26' (length=10)<br>
-- 2 => array(size=2)<br>
------ 0 => string '2016-10-03' (length=10)<br>
------ 1 => string '2016-10-10' (length=10)<br>
I will use these arrays to generate calendars in a function that is already ready, just group the dates in arrays, which will return me the calendar of each month with the dates marked.
That’s exactly it, I’m even embarrassed to not reach this conclusion, I was trying to make the Lice but it wasn’t working very well!
– Adriano Luz
Glad I could help
– Miguel