array_walk

PHP 4, PHP 5, PHP 7, PHP 8
array_walk - Apply a user supplied function to every member of an array
Manual
Code Examples

Example #1 array_walk example

Result: Before ...: d. lemon a. orange b. banana c. apple ... and after: d. fruit: lemon a. fruit: orange b. fruit: banana c. fruit: apple
PHP Version: