<?php
$arr=array(
'教学部'=>array(
array('李某',10=>'18','人妖'),
array('高某','20','男'),
array('张某','21','妖人'),
),
'宣传部'=>array(
array('李某','18','人妖'),
array('高某','20','男'),
array('张某','21','妖人'),
),
'财务部'=>array(
array('李某','18','人妖'),
array('高某','20','男'),
array('张某','21','妖人'),
),
);
$arr[宣传部][0][0]='张二娃';
foreach($arr as $value){
foreach($value as $value2){
foreach($value2 as $k=>$v){
echo $k . '-----' . $v .'<br />';
}
}
echo '---------分割线-----------'.'<br>';
}
echo '<pre>';
var_dump ($arr);
?>
代码:
foreach($arr as $bum => $b){
echo $bum.'<br />';
foreach($b as $ bh => $ren){
echo $bh.'---';
foreach($ren as $xx){
echo $xx.' ';
}
echo '
' ;
}
}