|
array_reduceIteratively reduce the array to a single value using a callback function Description
mixed array_reduce
( array
$array
, callable $callback
[, mixed $initial = NULL
] )
array_reduce applies iteratively the
Parameters
Return ValuesReturns the resulting value.
If the array is empty and Changelog
Examples
Example #1 array_reduce example
<?php This will result in $b containing 15, $c containing 1200 (= 10*1*2*3*4*5), and $d containing No data to reduce. See Also
|