Iterating
each
Definition
Description
Traverse through array or iterable object and call callback for each element (ignoring the result).
Modes
Constant name
Description
EACH_VALUE
Iterate using callback in form of function($value)
EACH_KEY_VALUE
Iterate using callback in form of function($key, $value)
EACH_VALUE_KEY
Iterate using callback in form of function($value, $key)
EACH_VALUE_KEYS_LIST
Iterate using callback in form of function($value, $key1, $key2, ...)
Only for array $iterable
EACH_KEYS_ARRAY_VALUE
Iterate using callback in form of function(array $keys, $value)
Only for array $iterable
Examples
Last updated