php array_walk_recursive函数的使用

<?php
function myfunction($value,$key)
{
echo "The key $key has the value $value<br />";
}
$a1=array("a"=>"Cat","b"=>"Dog");
$a2=array($a1,"1"=>"Bird","2"=>"Horse");
array_walk_recursive($a2,"myfunction");
?>

posted on 2015-06-25 16:36  与非朋仔  阅读(747)  评论(0)    收藏  举报

导航