$fruits = array("apple", "banana", "orange"); function print_fruit($fruit, $key) { echo "Key: " . $key . " - Value: " . $fruit . "<br>"; } array_walk($fruits, "print_fruit");
$fruits = array("apple", "banana", "orange"); function print_fruit($fruit, $key) { echo "Key: " . $key . " - Value: " . $fruit . "<br>"; } array_walk($fruits, "print_fruit");