简单教程
提交运行
代码编辑器:
<?php function myfunction(&$value,$key) { $value="yellow"; } $a=array("a"=>"red","b"=>"green","c"=>"blue"); array_walk($a,"myfunction"); print_r($a);
运行结果: