No problem to use this function 'multiselect field' which show on this website:
http://www.grocerycrud.com/documentation/options_functions/field_type
$crud->field_type('fruits','multiselect',
array( "1" => "banana", "2" => "orange", "3" => "apple"));
Next step, i try to extract data from database to replace the 'array' in the formulae above but failed, pls advise.
$this->db->select('employeeNumber');
$a = $this->db->get('employees')->result();
$crud->field_type('firstName', 'multiselect', $a);
I'm getting result like
Array ( [0] => stdClass Object ( [employeeNumber] => 1002 )
[1] => stdClass Object ( [employeeNumber] => 1056 )
Hmm... how to make it into this format, any advise?:
array( "1" => "banana", "2" => "orange", "3" => "apple")