[eluser]maria clara[/eluser]
hi to all,
my console keeps on showing this message:
Code:
<p>Severity: Warning</p>
<p>Message: Invalid argument supplied for foreach()</p>
<p>Filename: models/ccm_receipt_db.php</p>
<p>Line Number: 309</p>
<p>Severity: Warning</p>
<p>Message: Invalid argument supplied for foreach()</p>
<p>Filename: models/ccm_receipt_db.php</p>
<p>Line Number: 332</p>
here's my MODEL:
Code:
function save_detail($id,$rows0,$rows1,$rows2,$rows3,$dt)
{
$this->db->where('receipt_id', $id);
$this->db->delete('ccm_receipt_t');
foreach ($rows0 as $row0)
{
$rdata = explode('|', $row0);
$data['receipt_id'] = $id;
$data['si_id'] = $rdata[7];
$data['inv_date'] = convertViewDate($rdata[2]);
$data['inv_balance'] = $rdata[3];
$data['applied'] = $rdata[4];
$data['ewt'] = $rdata[5];
$data['evat'] = $rdata[6];
$this->db->insert('ccm_receipt_t', $data);
$this->updateSalesBalance($data);
}
anyone has an idea???
thanks in advance,
maria