php array_walk_recursive example code

php array_walk_recursive example code

php array_walk_recursive example

php array_walk_recursive example in php

$arr = array(1, array(2, 3));
// Call function on every item, even subarrays.
// Sign $item as reference to work on original item.
array_walk_recursive($arr, function(&$item, $key, $myParam){
  $item *= 2;
}, 'will be in myParam');
// $arr now is [2, [4, 6]]
By Manish Salunke In php -

Tags:

php

Sponsors

themeforest
pluralsight
Invest in you. Online courses as low as $11.99