map()
The map() method applies the callback to the elements
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