<?php$arr=array( 'Teaching Department'=>array( , array('Zhang 1','21','Monster'), ), 'Propaganda Department'=>array( array(' Li 2','18','Lady'), array('Gao 2' ,'20','Male'), array('Zhang 2','21','Monster'), ), 'Finanzabteilung '=>array( array('Li 3','18','Man '), array('Gao 3','20','Male'), array('Zhang','21','Yaoren '), ),);foreach($arr as $k=>$ a){echo'<table width="500" border="1">'; echo $k ; b=>$c){ foreach($c as $d=> $ E) {$ i = List ($ One, $ Two, $ Three) = $ e; '. $ i. '& lt;/td & gt;';
输出应该是这个样式
在第一层foreach内部的开始和结束分别添加
与即可