<?php
$eclass=$this->session->userdata('class_teacher');
$section=$this->session->userdata('class_teacher_section');
?>
<div class="container-fluid mt-3 mb-3">
<div class="row">
<div class="col-sm-12">

<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr><th colspan="8">Class : <?php echo $eclass;?> - <?php echo $section;?></th></tr>
<tr>
<th>Sr.No</th>
<th>Name</th>
<th>Father Name</th>
<th>Scholor No.</th>
<th>Contact No.</th>
<th>MM</th>
<th>Obt.Marks</th>
<th>%</th>
</tr>
</thead>
<tbody>
<?php

$count=0;
$student_result_info=$this->ExamModel->get_student_annual_result_rank($eclass,$section);
if($student_result_info){
foreach($student_result_info as $result_info){
$count=$count + 1;
$sid=$result_info['sid'];
$student_info=$this->ExamModel->get_student_data($sid);
if($student_info){
foreach($student_info as $student_data){
    

?>
<tr>
<td><?php echo $count;?></td>
<td><?php echo $student_data['student_name'];?></td>
<td><?php echo $student_data['father_name'];?></td>
<td><?php echo $student_data['sch_no'];?></td>
<td><?php echo $student_data['contact_no'];?></td>
<td><?php echo $student_data['MM'];?></td>
<td><?php echo $result_info['total_obtained_marks'];?></td>
<td><?php echo $result_info['percentage'];?></td>
</tr>
<?php
}
}
}
}
?>


</tbody>
</table>
</div>

</div>
</div>
</div>