I am new to codeigniter, i am simple datagrid with few columns…. what i want from grid is…i need get checked values from grid,….so i dont know how use foreach loop and get the values..
can any one explain me with example plz….
foreach ($persons as $person)
{
$this->table->add_row(form_checkbox('att',$person->tab_classid), $person->tab_classid, $person->tab_classtitle, date('d-m-Y H:i',strtotime($person->tab_classtime)),$person->tab_pemail,anchor($person->tab_prsturl,'view','target="_new"'),anchor($person->tab_recurl,'view','target="_new"'),$person->tab_classduration,$person->tab_crtdate,
anchor('person/view/'.$person->tab_classid,'view',array('class'=>'view')).' '.
anchor('person/update/'.$person->tab_classid,'update',array('class'=>'update')).' '.
anchor('person/test/'.$person->tab_classid,'Attendee',array('class'=>'attendee')).' '.
anchor('person/delete/'.$person->tab_classid,'delete',array('class'=>'delete','onclick'=>"return confirm('Are you sure want to delete this person?')"))
);
}
$data['table'] = $this->table->generate();
PHP is best for processing server code but what you are looking for is tend to be of client side analyses. I suggest you do this sort of check by javascript/jquery instead.
Leave/process this in an
each(function(){...});