php 用foreach排名学生成绩总成绩用 $total = array_sum($score); 平均成功 $avg = array_sum($score) / count($score); //foreach实现 $total = 0; foreach($score as $v){ $total += $v; } echo $total; echo $total / count($score);//平均
php的视频 清华的 有源代码留下邮箱发你