ID: 26634 Updated by: [EMAIL PROTECTED] Reported By: tgallagher at kalos-inc dot com -Status: Assigned +Status: Open Bug Type: Filesystem function related Operating System: Windows 2000 Pro PHP Version: 4.3.4 Assigned To: iliaa New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-12-15 12:59:54] tgallagher at kalos-inc dot com clairification: on the middle record I get 7 fields: expected 3. ------------------------------------------------------------------------ [2003-12-15 12:58:08] tgallagher at kalos-inc dot com Description: ------------ Using this sample.txt file with fgetcsv (tab delimited) " " "" "971221" "1" " " "" "950707" "\\ \\" " " "" "999637" "ERYC 250" on the middle record I get instead of 3 records, I get 7. instead of 3 records I get 2. record 1 is read correctly, records 2 and 3 run together. if I put a space at the beginning of the line with the double back slash it works. after searching the bug database I believe this error has not been reported. please correct me if this is not a bug. Reproduce code: --------------- <?PHP $fileHandle = fopen("sample.txt", "r"); while ($data = @fgetcsv ($fileHandle, 5000, "\t")) { print_r($data); } ?> Expected result: ---------------- Array ( [0] => [1] => [2] => 971221 [3] => 1 ) Array ( [0] => [1] => [2] => 950707 [3] => \\ \\" Array ( [0] => [1] => [2] => 999637 [3] => ERYC 250 ) Actual result: -------------- Array ( [0] => [1] => [2] => 971221 [3] => 1 ) Array ( [0] => [1] => [2] => 950707 [3] => \\ \\" [4] => [5] => 999637 [6] => ERYC 250 ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26634&edit=1