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