- array_walk: documentation ( source)
<?php
$fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple");
function pram_alter($item1, $key, $prefix)
{
$item1 = "$prefix: $item1";
echo $item1;
}
function test_print($item2, $key)
{
echo "$$key = '$item2';\n";
}
echo "Before ...:\n";
array_walk($fruits, 'test_print');
?>