<?php
$sweet = array('a' => 'apple', 'b' => 'banana');
$fruits = array('sweet' => $sweet, 'sour' => 'lemon');
function test_print($item, $key)
{
echo "$key holds $item\n";
}
array_walk_recursive($fruits, 'test_print');
?>
The above example will output:
a holds apple
b holds banana
sour holds lemon
You may notice that the key 'sweet' is never displayed. Any key that holds an
array will not be passed to the function.