I have a .xls file which contains large number of rows, which I have to store to a DB. Now I'm reading each row in a loop and inserting into table. Is there any way, I can dump all rows to the table in a single shot? (with no loops?)
for ($row = 2; $row <= $highestRow; $row++)
{
$rowData = $sheet->rangeToArray('A' . $row . ':' . $highestColumn . $row,NULL,TRUE,FALSE);
$entityName =$headings[0];
$entityValue=$rowData[0];
$rowData[0] = array_combine($headings[0], $rowData[0]);
$num = count($rowData[0]);
$excelDOB=$rowData[0]['date of birth'];
$student = array(
'name' => $name,
);
$this->common_model->insert_student_data($student);
}