PHP array_walk() 函数
实例
对数组中的每个元素应用用户自定义函数:
function myfunction($value,$key){
echo "The key $key has the value $value
";}
$a=array("a"=>"red","b"=>"green","c"=>"blue");
array_walk($a,"myfunction");?>
PHP array_walk() 函数
实例
对数组中的每个元素应用用户自定义函数:
function myfunction($value,$key){
echo "The key $key has the value $value
";}
$a=array("a"=>"red","b"=>"green","c"=>"blue");
array_walk($a,"myfunction");?>
本文标题:arrat_walk 做 循环处理 2018-05-22
本文链接:https://www.haomeiwen.com/subject/dbkhjftx.html
网友评论