Iterate the outer array, then the inner arrays. Add each value to an indexed array in your result.
foreach ($your_array as $sub_array) {
foreach ($sub_array as $key => $value) {
$result[$key][] = $value;
}
}
solved PHP – Split Multidimensional Array by key/value