$ID = $this->input->post('barang');
$reslt = array();
foreach($ID AS $key => $val){
$reslt[] = array(
"id" => $ID[$key],
"stok" => $_POST['qty'][$key]);
}
$this->db->update_batch('barang', $reslt, 'id');
Error
A PHP Error was encountered Severity: Notice
Message: Undefined index: id
Filename: database/DB_query_builder.php
Line Number: 1955
Backtrace:
File: E:\xampp\htdocs\restly\application\controllers\admin.php Line: 343 Function: update_batch
File: E:\xampp\htdocs\restly\index.php Line: 315 Function: require_once
Can any body help me?
$_POST['qty'][$key]);Change this to$_POST['qty'][$key])- ankit suthar