Can anyone tell me what I did wrong in this function? I can not find the error.
public function inserir_fotos() {
$fotos = $this->input->post('fotos');
$data = array(
foreach ( $fotos as $item => $value){
array(
'idImovel' => $this->input->post('idImovel'),
'imgImovel' => $value
),
}
);
return $this->db->insert_batch('fotos', $data);
}