[eluser]rikes_denis[/eluser]
i tried to get an array data of my checkbox, and when i use sizeof to make limit in my loop, i think it might not work properly
this is my code :
model
Code:
$checkBox = $this->input->post('checked');
print_r($checkBox);
for($i=0; $i<sizeof($checkBox); $i++){
// $this->db->order_by('id_js','asc');
$this->db->where('id_edu',$checkBox[$i]);
return $this->db->get($this->tbl);
}
controller
Code:
function preview()
{
$items = $this->educationmodel->preview()->result();
$i = 0;
foreach($items as $item){
$this->table->add_row(++$i, $item->id_edu,$item->edu_per1, $item->edu_per2, $item->institution, $item->qual, $item->gpa);
}
$data['table'] = $this->table->generate();
$data['dynamiccontent'] = 'coba_preview';
$this->load->view('templates/template', $data);
}
i dunno if sizeof can work properly in CI or not, can someone help?
thanx b4