Less than 1 minute
array_collate
Collate a multi-dimensional array into an associative array where $key_item is the key and $value_item is the value.
public array_collate({Array})
- If the key value does not exist in the array, the element is skipped.
- If the value item does not exist, the value will be NULL.
Parameters
Parameter | Type | Description |
---|---|---|
$array | array | the array to collate |
$key_item | string | the value to use as the key. If true is passed, the key will be the array key. |
$value_item | string | The value to use as the value. If not supplied, the whole element will be the value. Allows re-keying a mult-dimensional array by an array element. |
$group_item | string | optional value to group items by |
Generated by Hazaar API Doc Generator