fork download
  1. <?php
  2.  
  3. $arr = [[2012 => 'foo'],[2014 => 'bar'],[2015=>'baz']];
  4. $new = [];
  5. foreach($arr as $i) {
  6. $new += $i;
  7. }
  8.  
  9. var_dump($new);
Success #stdin #stdout 0.03s 52432KB
stdin
Standard input is empty
stdout
array(3) {
  [2012]=>
  string(3) "foo"
  [2014]=>
  string(3) "bar"
  [2015]=>
  string(3) "baz"
}