- var_dump: documentation ( source)
- array_walk_recursive: documentation ( source)
<?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);