holicovrazvan1 / parsecsv-for-php

Automatically exported from code.google.com/p/parsecsv-for-php
MIT License
0 stars 0 forks source link

Duplicate field names in the heading. #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
First off, I'm not sure if this a problem with parseCSV - or if I have csv 
files that are violating the standard.

Basically, the problem is having columns with the same name.

For example:

"id","name","column_A","numbers","column_A"
0,"test","abcd",12,""
0,"hello","defg",14,""

Etc...

The last column (column_A) has the same name as the third. When I try and auto 
parse a file like this, the last column gets ignored.
In addition, when it parses this file, it looks like there is only 4 columns - 
when there is actually 5.

What steps will reproduce the problem?
1. Create a CSV file that has multiple columns with the exact same name in the 
heading.
2. Have parseCSV try to auto parse the file.
3. print_r($csv->data) the result and notice that the fields with duplicate 
names are missing / have been ignored.

What version of the product are you using? On what operating system?
This issue exists with both v0.4.3 beta and the stable v0.3.2.

Original issue reported on code.google.com by jeffgen...@gmail.com on 7 Aug 2010 at 5:58