PHP array_walk() Function

The array_walk() function apply a user defined function to every element of an array. The user-defined function takes array's values and keys as parameters.The array_walk() function runs each array element in a user-defined function. The array's keys and values are parameters in the function.array_walk — Apply a user supplied function to every member of an array

Example -

Example -