I have two arrays to insert data to database. The first array is like
$data= array(
'date'=>$date,
'amount'=>$amt,
);
Next array is like same. But I have to check some conditions. I put the array like
if($mode == 1)
{
$data= array(
'Percentage'=>$percent,
'deduction'=>$deduct,
);
}
else if($mode ==2)
{
$data= array(
'Percentage1'=>$percent,
'deduction1'=>$deduct,
);
}
Then I use
$this->amout_model->insert_amount($data,$app_id);
But insert the data of one Array. How to insert two array of data?
var_dump($data)above the ` $this->amout_model->insert_amount($data,$app_id);`