时间:2021-07-01 10:21:17 帮助过:6人阅读
姓名 | 年龄 | 性别
"; echo $arr2[$i][$j]; echo " | ";
foreach($arr as $k=>$val){
echo $val['name'].$val['age'].$val['sex']."
";
}
echo "
";
?>
代码如下:
$arr = array('one'=>array('name'=>'张三','age'=>'23','sex'=>'男'),
'two'=>array('name'=>'李四','age'=>'43','sex'=>'女'),
'three'=>array('name'=>'王五','age'=>'32','sex'=>'男'),
'four'=>array('name'=>'赵六','age'=>'12','sex'=>'女'));
foreach($arr as $key=>$value){
foreach($value as $key2=>$value2){
echo $value2;
}
echo "
";
}
?>
http://www.bkjia.com/PHPjc/327480.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/327480.htmlTechArticle 代码如下:?php //使用for循环遍历 $arr2=array(array("张三","20","男"),array("李四","25","男"),array("王五","19","女"),array("赵六","25","女")); ec...