I want to combine two arrays into single array by adding the duplicate values, for example,
$first = array('one','two','one');
$second = array(10,5,30);
Expected result would be,
$third = array(
'one' => 40,
'two' => 5
);
Here I have added the two numbers which is corresponded to repeated position.
Thanks in advance!