mapKey()
The mapKey() method all similar to map(), but this applies to keys
Example.php
Syntax
Parameter
$callback
A function that produces an element of the new Array, taking three arguments:
$value
The current element being processed in the array.$key
The index of the current element being processed in the array.$array
The arrayevery
was called upon.
Return value
A new array with each element being the result of the callback function.
Prefixing
References
Last updated