MY Question: Student table join result table ,but same student name display multiple, so My question I have same student display once
Model:
public function select(){
$this->db->select('*');
$this->db->from('result');
$this->db->join('student', 'result.student_id=student.student_id');
return $this->db->get()->result_array();
}
Controller:
public function index(){
$data = array(
'page_title' => 'Result',
'page_name' => 'result/result',
'result'=> $this->result_model->select()
);
$this->load->view('admin/template', $data);
}
View
<?php foreach ($result as $key => $value): ?>
<tr>
<td><?php echo $value['first_name']; ?></td>
<td><?php echo $value['mark']; ?></td>
</tr>
<?php endforeach;?>

