<?php
$courses_id=$this->uri->segment('3');
$course_table='courses';
$course='';
$get_course_info=$this->DeveloperModel->get_item_data($courses_id,$course_table);
if($get_course_info){
    foreach($get_course_info as $info){
        $course=$info['course'];
    }
}
?>

<div class="container bg-white mt-3 mb-3 pt-3 pb-3">
    <div class="row">
        <div class="col-sm-12">
            
            <div class="table-responsive">
                <table class="table table-bordered table-striped" id="mytable">
                    <thead>
                        <tr><th colspan="4">Class  : <?php echo $course;?> New</th></tr>
                        <tr>
                            <th>#</th>
                            <th>Name</th>
                            <th>Father Name</th>
                            <th>Contact No</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $all_students_for_course=$this->DeveloperModel->get_course_students_old($courses_id);
                        $count=0;
                        if($all_students_for_course){
                            foreach($all_students_for_course as $students){
                                if($students['impor_ref_id']!=0){
                                $count=$count + 1;
                                
                                ?>
                        <tr>
                            <td><?php echo $count;?></td>
                            <td><?php echo $students['student_name'];?></td>
                            <td><?php echo $students['father_name'];?></td>
                            <td><?php echo $students['contact_no'];?></td>
                        </tr>                                
                                
                                <?php
                                }
                            }
                        }
                        ?>

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