Use php to complete the date in the array. if such an array is encountered, how does one fill in the period value of every time in the array; implement an array with 12 months for each large array (because sometimes there is no previous half year & nbsp; or the next half year's month), the value of each [period] & nbsp; complete as from (201301 ~ 201312. That is, from the beginning of the 1949th month, you can complete & nbsp; 01 ~ 0 use php to complete the date in the array
// If such an array is encountered, how to fill in the month that is missing for each period in the array so that each large array has an array of 12 months (because sometimes there is no month of the first half or the next half year ), the value of each [period] is filled with a value from (201301 ~ 201312.
That is, from the very beginning of the 1949th month ~ 04. If 01 ~ 09. sort every two-dimensional array by month.
Array
(
[0] => Array
(
[Period] = & gt; 201303
[Out_count] = & gt; 383
)
[1] => Array
(
[Period] = & gt; 201304
[Out_count] => 43
)
[2] => Array
(
[Period] = & gt; 201306
[Out_count] = & gt; 2859
)
[3] => Array
(
[Period] = & gt; 201307
[Out_count] = & gt; 251
)
[4] => Array
(
[Period] = & gt; 201309
[Out_count] = & gt; 807
)
)
// Get
Array
(
[0] => Array
(
[Period] = & gt; 201301
[Out_count] => 0
)
[1] => Array
(
[Period] = & gt; 201302
[Out_count] => 0
)
[2] => Array
(
[Period] = & gt; 201303
[Out_count] => 0
)
[3] => Array
(
[Period] = & gt; 201304
[Out_count] => 0
)
[4] => Array
(
[Period] = & gt; 201305
[Out_count] => 0
)
[5] => Array
(
[Period] = & gt; 201306
[Out_count] => 0
)
[6] => Array
(
[Period] = & gt; 201307
[Out_count] => 0
)
[7] => Array
(
[Period] = & gt; 201308
[Out_count] => 0
)
[8] => Array
(
[Period] = & gt; 201309
[Out_count] => 0
)
[9] => Array
(
[Period] = & gt; 201310
[Out_count] => 0