我已经创建了这个数组:
$studentAssProg[]=array('studentID'=> $studentID,'assignmentID'=>$assignmentID,'assProgLevel'=>$progress);
对于assignmentID='3'的每个学生,打印progressLevel的最佳方式是什么?
foreach($studentAssProg as $data){
if($data['assignmentID']==3){
echo $data['assProgLevel'];
}
}
foreach($studentAssProg as $d) :
if($d['assignmentID'] == 3)
echo $d['assProgLevel'];
endforeach;