-1

I have an array that looks like this:

Array 
( 
[0] => Array 
       ( 
       [25] => 21.00 
       )
[1] => Array 
       ( 
       [33] => 63.00 
       ) 
 )

and i want to make it like this:

Array (
      [25] => 21.00 
      [33] => 63.00 
      )

Is there a build in function that i can use or any idea of something else? Thank you in advance!

1 Answers1

0
$output = [];
foreach($input as $subArray) {
   foreach($subArray as $k=>$v) {
      $output[$k] = $v;
   }
}
Evert
  • 93,428
  • 18
  • 118
  • 189