I have an array, that needs to be inserted into DB (every value is new row). Do I have to do coding like this, or there are other way to do this?
function galerija_insert($name){
foreach($name as $nm) :
$data['name'] = $nm;
$this->db->insert('galerija', $data);
endforeach;
}