- array_map: documentation ( source)
- var_dump: documentation ( source)
- array_filter: documentation ( source)
- array_walk: documentation ( source)
<?php
$array = array(1, "apples",2, "oranges",3, "plums");
// array_filter()
$filtered = array_filter( $array, "ctype_alpha");
$nu = array_map( "strtoupper", $filtered);
// array_walk
$f = function(&$item,$key,$prefix) {
$item = "$key: $prefix: $item";
};
array_walk($nu, $f,"fruit");
var_dump($nu);
?>