I'm having an issue if somebody could help would be much appreciated.
<input type="checkbox" name="symbols[]" value="1" />
.... and this line repeats 10-15 times with a different value
model
$data = array(
array('symbol_id' => $this->input->post('symbols'))
);
return $this->db->insert_batch('symbols', $data);
now my problem is that is inserting only first value of the selected checkbox (in this case 1) and ignores everything else without inserting a new row of other checkboxes (like value 3, 5 and 9). Could you suggest me some options ?
note: want i want to achieve is to insert a new row for each checkbox, so i can join another table which holds the symbols images (the values of checkboxes representing the id's of images). If you have any other way around of how I could do this is very welcomed. Thank you
edit: this is var_dump:
array(7)
{
[0] => string(1) "8"
[1] => string(1) "9"
[2] => string(2) "10"
[3] => string(2) "11"
[4] => string(2) "12"
[5] => string(2) "13"
}