Index a result array.
public static index ( array | Traversable $Data, string | array $Columns, array $Options = [] ) : array | ||
$Data | array | Traversable | The array to index. It is formatted similar to the array returned by Gdn_DataSet::Result(). |
$Columns | string | array | The name of the column to index on or an array of columns to index on. |
$Options | array | An array of options for the method. - Sep: The string to seperate index columns by. Default '|'. - Unique: Whether or not the results are unique. - true (default): The index is unique. - false: The index is not unique and each indexed row will be an array or arrays. |
return | array |