Say, I have an array with months
$months = array('Jan', 'Feb', 'Mar'...'Dec');
And another, with days (say, for year 2010)
$mdays = array(31, 28, 31...31);
I want to merge/combine these two arrays, into an array like this:
$monthdetails[0] = ('month' => 'Jan', 'days' => 31)
$monthdetails[1] = ('month' => 'Feb', 'days' => 28)
...
$monthdetails[11] = ('month' => 'Dec', 'days' => 31)
I can loop through both the arrays and fill the $monthdetails
. I want to know whether there are any functions/easier way for achieving the same result.
Thanks! Raj