PHP中foreach循环出一个表格,得到数组中的每一个值

2024-11-13 19:35:50
推荐回答(1个)
回答1:


$arr=array(
"web"=>array(
"weburl"=>"http://www.baidu.com",
"webname"=>"百度一下",
"webconfig"=>"xml"
),
"users"=>array(
"username"=>"用户名",
"password"=>"密码",
"Email"=>"伊妹儿",
)
);
echo "";
foreach ($arr as $temp){
echo "";
}
?>
网站用户
";
echo "";
foreach ($temp as $tp){
echo "";
}
echo "
".$tp."