function igroup($list, $by, ...)libphutil Technical Documentation (Core Utilities)
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 | $list | List of arrays to group by some index value. |
string | $by | Name 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
dict | Dictionary mapping distinct index values to lists of all objects which had that value at the index. |
- Defined
- src/utils/utils.php:350