Page MenuHomePhorge

function igroup($list, $by, ...)
libphutil Technical Documentation (Core Utilities)

Group a list of arrays by the value of some index. This function is the same as mgroup(), except it operates on the values of array indexes rather than the return values of method calls.

Parameters
list$listList of arrays to group by some index value.
string$byName of an index to select from each array in order to determine which group it should be placed into.
...Zero or more additional indexes names, to subgroup the groups.
Return
dictDictionary mapping distinct index values to lists of all objects which had that value at the index.