***** problem====can't insert into my table but when i ver_dump it it shows all record needed to be insert====
Here is my sample code.
for ($col = 0; $col <= $highestColumnIndex; $col++) {
//assigning all data to one variable
$allcolrowdata =$columnNames = mysqli_real_escape_string($connect, $worksheet->getCellByColumnAndRow($col, $row)->getValue());
//echo $allcolrowdata.'<br>';
$allcolrowdataexplode=explode(",",$allcolrowdata);
var_dump( $allcolrowdataexplode).'<br>';
foreach($allcolrowdataexplode as $key => $inserted){
//echo $inserted;
$query_insert ="INSERT INTO tem_treg2 (title,surname,first_name,middle_name,gender,dob,marital_status,occupation,phone_number,company_name,registration_type,registered_by,tax_id,office_address,office_city,temp_reg,workplace_category,active,monthly_gross,nhf,nhis,nsitf,basic_salary,grade,designation,pension,gratuity)
VALUES ('','$inserted','','','','','','$textfile_occupation','','$institution','','$UserLogin','','','','','','','','','','','','','','','')
";
//var_dump($query_insert);
//('','$values1','$inserted','','','','','$textfile_occupation','','$institution','','$UserLogin','','','','','','','','','','','','','','','')
}
}