array_reduce

Example

 mixed array_reduce ( array $input , callback $function [, mixed $initial = NULL ] ) 

Description

array_reduce() applies iteratively the function function to the elements of the array input, so as to reduce the array to a single value.

Return Values

Returns the resulting value. If the array is empty and initial is not passed, array_reduce() returns NULL.