Returns the values from a single column (sub key) in a given multi-dimensional array.

This wraps simply the powerful native PHP-function:  array_column(...)

TWIG: Same functionality as twig-filter "... |column(<subKey>)" !

https://twig.symfony.com/doc/2.x/filters/column.html


Syntax

array_column(array $array, string $subKey, string $indexKey = null): array


Parameter

@param array $array A multi-dimensional numeric or associative array.

@param string|int|null $subKey The key (column) identifying the column within $array to extract.

@param string|int|null $indexKey Another optional key (column) to use as the index/keys for the returned array.

If NULL then returned array is a numerical - in any case.



Return

Returns an array with the extracted sub-array.


Examples

Yet to come...

...