I have problem with my csv parser. Sometimes in my CSV file I using syntax " as item name, for example:
1;73,09;41,66;23;89,9007 5907558600001;90;AAA-ACC;"Item descript 26""x32 ss";"etc";
As you can see, in my description in csv file have "" or " but it is not enclosure.
I try import this file to php using this code:
.....
if (($handle = fopen($_FILES["fileToUpload"]["tmp_name"], "r")) !== FALSE) {
while (($data = fgetcsv($handle, 0, ";",'"')) !== FALSE) {
$de = 0;
$cat = str_replace(" ", "", $data[7]);
$ar1[$cat] = 'a';
}
}
print_r($ar1);
....