In PHP, we have two functions that run through the array and apply a given function to each element: array_walk and array_map.
Example:
$meu_array = array(1, 2, 3);
$callback = function ($value)
{
return $value * 2;
};
$novo_array =...
asked by
28.07.2015 / 17:48