<?php
$arrays = [
51 => [
5 => "",
2 => "",
8 => ""
],
78 => [
18 => "",
23 => "",
21 => ""
],
8 => [
18 => "",
23 => "",
21 => ""
]
];
$result = array_reduce($arrays, function($carry, $item) {
$carry = array_merge($carry, $item);
return $carry;
}, []);
if (count(array_filter($result)) === 0) {
echo "array contains only empty values";
}
preferences:
24.39 ms | 406 KiB | 5 Q