Hi All
Trying to import a large amount of data via a csv file in php.
However, the file in question seems to be both a coma seperated and tab delimited. Any ideas how to modify the code below to deal with that?
At the moment it does seperate the fields correctly, but it adds loads of white spae into the database fields.
Any help is appreciated
Aaron
Trying to import a large amount of data via a csv file in php.
However, the file in question seems to be both a coma seperated and tab delimited. Any ideas how to modify the code below to deal with that?
Code:
$file[] = explode('","', trim($line, '"'));
At the moment it does seperate the fields correctly, but it adds loads of white spae into the database fields.
Any help is appreciated
Aaron