A csv file contains a ‘\’ character in one of its record for which i am not able to get the exact number of key value pair in the array.
I am using PHP fgetcsv function as follows-
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
....
}
I have also tried escaping the characters as follows.
while (($data = fgetcsv($handle, 1000, ",",'"',"\\")) !== FALSE) {
....
}
But it did not work.What might be the possible solution?
1 Answer