关于array_walk的问题?php$fruits=array("d"="lemon","a"="apple","b"="banana","c"="orange");functiontest_alter($item1,$,关于array_walk的有关问题 ...
关于array_walk的问题 $fruits = array("d"=>"lemon","a"=>"apple","b"=>"banana","c"=>"orange"); function test_alter(&$item1,$key,$prefix) { $item1 = "$prefix:$item1"; } function test_print($item2,$key) { echo "$key.$item2 \n"; } echo "Before.....\n"; array_walk($fruits, 'test_print'); array_walk($fruits, 'test_alter','fruit'); echo "...and after:\n"; array_walk($fruits,'test_print'); ?> 关于这段代码的 最后几行的遍历 表示理解不能 求大大们帮我细细的分析一下 让我理解~
分享到:
更多
原作者: 互联网
来自: 网络收集
全部回复(0) 微信:xu08290201 QQ:75283535
返回顶部 |