bauhsoj
11-07-2007, 02:50 PM
I have not upgraded or changed PHP since I last used the function fgetcsv(), however it is now breaking up enclosed delimiters.
Take this for example:
12345,Yes,"Blah blah blah, yadda yadda yadda, something something something",50
When the following code is called it should produce 4 elements of data in an array but instead it now produces 6:
$fp = fopen($source_file, 'r');
$field_length = 4096;
$delimiter = ',';
$enclosure = '"';
$data = fgetcsv($fp, $field_length, $delimiter, $enclosure);
Why is this happening? Why would it suddenly begin happening without altering any code? Could a Windows update have caused this? That is the only thing that changed on the server. :confused:
Take this for example:
12345,Yes,"Blah blah blah, yadda yadda yadda, something something something",50
When the following code is called it should produce 4 elements of data in an array but instead it now produces 6:
$fp = fopen($source_file, 'r');
$field_length = 4096;
$delimiter = ',';
$enclosure = '"';
$data = fgetcsv($fp, $field_length, $delimiter, $enclosure);
Why is this happening? Why would it suddenly begin happening without altering any code? Could a Windows update have caused this? That is the only thing that changed on the server. :confused: