array_walk

It apply a user function to every member of an array

Example

<?php
function func($value,$key){
echo “The key $key has the value $value<br />”;
}
$arr1=array(“p”=>”php”,”a”=>”ASP”);
array_walk($arr1,”func”);
?>

Output

The key p has the value php
The key a has the value ASP

Share