- array_walk_recursive: documentation ( source)
<?php
$array = array(
0 => array('user_id' => '1', 'email'=>'email1'),
1 => array('user_id' => '2', 'email'=>'email2'),
2 => array('user_id' => '3', 'email'=>'email3')
);
//var_dump(array_keys($array));
$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');