array_column implementation that works on multidimensional arrays (not just 2-dimensional):
<?php
function array_column_recursive(array $haystack, $needle) {
$found = [];
array_walk_recursive($haystack, function($value, $key) use (&$found, $needle) {
if ($key == $needle)
$found[] = $value;
});
return $found;
}
Taken from https://github.com/NinoSkopac/array_column_recursive