I have the following code, that I use to read a csv file with CRLF as lines endings
if (($fp = fopen($path, "r")) !== FALSE) {
while (($record = fgetcsv($fp, 1000, "\r\n")) !== FALSE) {
if ($row == 0) {
$record[0] = $batchHeader;
}
$newCsvData[] = $record;
$row++;
}
}
When I upload the csv file I get the following error: fgetcsv(): delimiter must be a single character
Here is a sample or my csv:
Thanks.