I have read documentation and searched this site extensively prior to asking this question.
$file = new SplFileObject("/var/www/qacentre/compliance/compliance.csv");
$file->setFlags(SplFileObject::READ_CSV);
foreach ($file as $row) {
}
Example CSV line;
"ABEL, TAMMY 454454","End of: ABEL, TAMMY 454454",QP544454,28/10/2012 11:41,"0811 unlawfully use, possess","STEPHENS, JEREMY 54544454",LINK OPERATIONS,Located details incorrect,Entity: FORD FALCON Reg #: Colour: White
I have echoed the output and it appears that it is not recognizing the enclosure character ("). I have attempted to use SetCSVControl
although i am using the default enclosure. I have also tried escaping the enclosure character in SetCSVControl
(as I have no control over the CSV file I am exporting).
For example when I print the result for the first column, which should be ( ABEL, TAMMY 454454 ) I am receiving ( "ABEL ).
I have read this could be an issue with my locale setting (en-GB,en-US;q=0.8,en;q=0.6)?
Any help would be great.