<?php $myArray = array( "a", array( "a", "b", array( "a", "b", "c", array( "a", "b", "c", "d", array("the end") ) ) ) ); function manipulate(&$val) { $val .= " appended"; } array_walk_recursive($myArray, 'manipulate', $myArray); var_dump($myArray);
You have javascript disabled. You will not be able to edit any code.