主页
PHP
PHP array_walk_recursive() 函数
tryphp_func_array_walk_recursive
运行 ❯
×
更改方向
保存代码
更改主题
<?php function myfunction($value,$key) { echo "The key $key has the value $value
"; } $a1=array("a"=>"red","b"=>"green"); $a2=array($a1,"1"=>"blue","2"=>"yellow"); array_walk_recursive($a2,"myfunction"); ?>