/********** Begin *********/ foreach($wage as $key=>$value){ echo $key."部门人员如下:"; echo "<br>"; if(is_array($value)){ foreach($value as $key1=>$value1){ echo $value1[0]." ".$value1[1]." ".$value1[2]." ".$value1[3]." "; echo "<br>"; } } } /********** End *********/ ?> /********** Begin *********/ $maxkey = array_search(max($grade),$grade); $minkey = array_search(min($grade),$grade); echo "打出最低分的裁判为:".$minkey.",打分为:".min($grade)."<br>"; echo "打出最高分的裁判为:".$maxkey.",打分为:".max($grade); //移除最大和最小 unset($grade[$maxkey]); unset($grade[$minkey]); $num = null; foreach($grade as $name => $vlue){ $num += $vlue; } $x = $num/count($grade); echo "<br>最后得分为:".$x; /********** End *********/ /********** Begin *********/ arsort($age); foreach($age as $key=>$value){ echo $key; echo "<br>"; }