Dec 17, 2023
0
Level 1
Read CSV-File (problem with richtext)
I try to read a CSV-File, but I have problems, because in the CSV-File there is richtext with line breaks and this leads to a wrong result in my output.
I read the csv using this code
$csvAsArray = array_map("str_getcsv", file($request->file("csv")->getPathname(), FILE_IGNORE_NEW_LINES));
My CSV looks like this: https://i.postimg.cc/yYsPt3dg/Screenshot-2023-12-17-173147.png
Please or to participate in this conversation.