<?php $arrData = array ( array( 'a' => 'test', 'c' => 1, 'd' => 2, 'e' => 'B' ), array( 'c' => 1, 'd' => 2, 'e' => 'B' ), array( 'b' => 'test2', 'c' => 1, 'd' => 2, 'e' => 'B' ) ); $out = array(); foreach ($arrData as $arr) { $out = array_merge($out, $arr); } print_r($out); $out = array_reduce($arrData, function ($c, $v) { return array_merge($c, $v); }, array()); ksort($out); print_r($out);
You have javascript disabled. You will not be able to edit any code.