I have 2 arrays
$array1 = array(
['2013-05-01']=>'test',
['2013-05-02']=>'testing',
['2013-05-03']=>'working',
['2013-05-04']=>'future test');
$array2 = array(
['2013-05-01']=>'1',
['2013-05-02']=>'done',
['2013-05-03']=>'code',
['2013-05-05']=>'release');
I want to join these array, so that output is
$result = array(
['2013-05-01']=>'test 1',
['2013-05-02']=>'testing 2',
['2013-05-03']=>'working code',
['2013-05-04']=>'future test',
['2013-05-05']=>'release')
I tried $result = $array1 + array2; array_merge() , array_combine() none gave the correct result.
Can you help me please.
function array_join($arr1, $arr2) {return array(['2013-05-01']=>'test 1', ['2013-05-02']=>'testing 2',['2013-05-03']=>'working code');}- just messing ;)