Hi there
I've a text file like this:
a
b
02/02/2002
d
e
01/01/2001
I can load this into an array using file() but I then want (assuming this is a good way to do this?) to sort that array by the date, thus want to put it into a multidimensional array.
Basically every three lines in the original array is 1 record.
With the above example how can I get two records in an array sorted by date, ie:
record 1 = d,e,01/01/2001
record 2 = a,b,02/02/2002
Unfortunately the format of the text files is fixed.
Hope that makes sense!
Thanks
-Colin
I've a text file like this:
a
b
02/02/2002
d
e
01/01/2001
I can load this into an array using file() but I then want (assuming this is a good way to do this?) to sort that array by the date, thus want to put it into a multidimensional array.
Basically every three lines in the original array is 1 record.
With the above example how can I get two records in an array sorted by date, ie:
record 1 = d,e,01/01/2001
record 2 = a,b,02/02/2002
Unfortunately the format of the text files is fixed.
Hope that makes sense!
Thanks
-Colin