Update:
If you're interested in giving this program a run I finished it, and it is here:
http://www.mustangmapping.com/sort.php
If you have a file that matches the layout below and for some strange odd reason you need to sort it the same way I did, give it a shot! Let me know what you think 🙂.
-K
ORGINAL POST:
I am looking for a quick way to sort & consolodate some information from a CSV file with PHP. Here is an example of what I need to happen.
Input:
1st St,Pg 3
1st St,Pg 15
Abbot St,Pg 4
Arlington Rd,Pg 8
Jackson Rd,Pg 1
Jackson Rd,Pg 2
Jackson Rd,Pg 5
Output:
1st St,Pg 3.15
Abbot St,Pg 4
Arlington Rd,Pg 8
Jackson Rd,Pg 1.2.5
Basically I need to take every roadname and have it consolodate all of the pages it appears on to one line. (the "Pg's" wont be there however, I just put them in there as reference as to what the numbers were all about, they can easily be added at the end when the information is outputted)
I've been able to shortcut it quite a bit using some basic Excel functions... but that doesn't really help me out as far as dealing with dynamic information on the web. Does anyone have any ideas on how to go about this sort of thing? I do have the option of using a MySQL database if needed, though doing it without would be preferable.
-K