PHP array_walk_recursive() Function

The array_walk_recursive() function runs each array element in a user-defined function. The array's keys and values are parameters in the function. The difference between this function and the array_walk() function is that with this function you can work with deeper arrays (an array inside an array) The array_walk_recursive() function apply a user defined function to every element of an array recursively. The user-defined function takes array's values and keys as parameters.array_walk_recursive — Apply a user function recursively to every member of an array

Example -

Example -