I have used array_merge(); but for some reson is not working the way I need it... so I hve multiple arrays with almost the same information as follow...
$array1 = array (
'2014-06-01'=> array (
'date'=> '2014-06-01',
't1'=> 20,
't2'=> 5
);
'2014-06-02'=> array (
'date'=> '2014-06-02',
't1'=> 20,
);
'2014-06-03'=> array (
'date'=> '2014-06-03',
't1'=> 9,
't2'=> 2
);
);
$array2 = array (
'2014-07-01'=> array (
'date'=> '2014-07-01',
't1'=> 4,
't2'=> 1
);
'2014-07-02'=> array (
'date'=> '2014-07-02',
't1'=> 6,
't2'=> 3
);
'2014-07-03'=> array (
'date'=> '2014-07-03',
't1'=> 9,
);
);
So that's how I have my arrays for one purpose, but instead of building another query to get another arrays with almost the same information I'd like to know how can I build another array from those 2 or 3 similar arrays...
the final array that I'd like to get is something like this...
$final_arr = array (
'01' => array (
't2_m_jun'=>5,
't2_m_jul'=>1,
);
'02' => array (
't2_m_jun'=>0,
't2_m_jul'=>3,
);
'03' => array (
't2_m_jun'=>2,
't2_m_jul'=>0,
);
);
now, the 01, 02, 03...etc is the date from 1 to 30 or 31 depending on the month, the so from each array I need the date, if the index is 2014-06-01 I only need 01 and from that I need the value of t2, and for the second array is the same so that I can put'em together with new keys and values from t2 ...
I'm not good building functions or working with arrays that is why I need your help.
Thank you for taking the time to read my post.