function converter(array $input): array
{
$output = [];
foreach ($input as $items) {
foreach ($items as $key => $value) {
if (!isset($output[$key])) {
$output[$key] = [];
}
$output[$key][] = $value;
}
}
return array_values($output);
}
$input = [
[34 => 'uni-1-34'],
[34 => 'uni-2-34'],
[44 => 'uni-1-44'],
[44 => 'uni-2-44'],
];
print_r(converter($input));