Whendoingthebrandsearchthroughtheinputpost,Ineedtolistalltheproductsthatcontaintheidoftheselectedbrand.Belowismyexcerpt.
$marca=$this->input->post('marca');$marca=explode(',',$marca);if(count($marca)>0){$i=0;foreach($marcaas$row){$i++;if($row!=="") {
if ($row !== "0") {
$query[] = $row;
$this->db->where_in(' marca_id ', $query);
}
}
}
}
This section only lists if the marca_id
field has an integer, I know I have to use the json_decode
function, but I can not get the expected result.