 <pre><code>$newArray = []; foreach($array as $value) { foreach($value as $key =&gt; $data) { $newArray[$key][] = $data; } } var_dump($newArray); </code></pre> <p>or </p> <pre><code>$newArray = []; foreach($array as $value) { $newArray = $newArray + $data; } var_dump($newArray); </code></pre>