pluck — Return one column of a multidimensional array as an array.

Utility-related functions

Summary

pluck($col, $array)

Return one column of a multidimensional array as an array.

Parameters:
  • $col (string|int) – The column to pluck.
  • $array (array) – The array from which to pluck.
Returns:

array The column as an array.

Usage

Examples

See Also