PHP CSV Importer : Multiple rows due to line break in one column
one text
Trying to import data from CSV files using PHP Codeigniter.
The file has column description
in which the data entered has some enter or new line within a cell but it does not create a new row in CSV. On the other hand, while importing using php it generates a new row in the loop which is being inserted as a new record in the database.
How to resolve this issue. Picture attached.
$csv_array = $this->csvreader->parse_file($file_path);
foreach ($csv_array as $row) {
$description =$row['description'];
echo '<pre>';
var_dump(($row));
}
Source