Welcome Guest, Not a member yet? Register   Sign In
my "sizeof" doesn't work
#1

[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


Messages In This Thread
my "sizeof" doesn't work - by El Forum - 04-20-2011, 11:23 AM
my "sizeof" doesn't work - by El Forum - 04-20-2011, 11:31 AM
my "sizeof" doesn't work - by El Forum - 04-20-2011, 12:13 PM
my "sizeof" doesn't work - by El Forum - 04-20-2011, 12:26 PM
my "sizeof" doesn't work - by El Forum - 04-20-2011, 01:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB