holicovrazvan1 / parsecsv-for-php

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

Sort certain column in CSV that do not have header? #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
How can I do sorting for certain column for CSV file that don't have
header? Is is possible now?

Original issue reported on code.google.com by yin.swee...@gmail.com on 14 May 2008 at 4:46

GoogleCodeExporter commented 9 years ago
Try using a number as the sort_by value. 0 being the first column, 1 being the 
2nd column in the file. It should 
work, altho I can't recall if I ever fully tested it *whistles innocently*

Let me know how it goes :)

Original comment by zynode on 14 May 2008 at 4:53

GoogleCodeExporter commented 9 years ago
I have verified that sorting files which do not use headers can be done using 
numbers. Set $csv->sort_by to "0" 
to sort by the first column, "1" sorts by the 2nd column, and so forth.

Issues closed :)

Original comment by zynode on 29 Jun 2008 at 2:52