Missing months in Calendar
I am trying to set values of any missing months in my nested array for specific years.
Data:
$data = array(
'2019'=>array('January'=>224, 'March'=>66, 'September'=>301),
'2018'=>array('April'=>45, 'August'=>116, 'November'=>38)
);
As you can see in the above array, year 2019 and 2018 have missing months. How can I can add those missing months and set the values to zero? Please advice.
from Recent Questions - Stack Overflow https://ift.tt/30ZToLF
https://ift.tt/eA8V8J
Comments
Post a Comment