PHP array_reduce() Function

The array_reduce() function is used to reduce the array to a single value by iteratively using a user-supplied function.The array_reduce() function sends the values in an array to a user-defined function, and returns a string.

Example -

Example -