← All docs

array_column()

Returns the values from a single column of an array of arrays.

array_column()

function array_column(array $array, string $column_key): array

Returns the values from a single column of an array of arrays.

Parameters:

  • $array (array)
  • $column_key (string)

Returns: array

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how array_column is implemented in the compiler, see the internals page.