Re: [PHP] PHP sorting csv array output

2007-05-15 Thread Anna Vester
Yep, that would be the perfect solution, but, unfortunately, database is not an option for this project. Thanks for looking! I did get a solution though from another list. Here is a working version: http://veanndesign.com/sorting.php compare it to the not working one: http://veanndesign.com/tes

Re: [PHP] PHP sorting csv array output

2007-05-12 Thread Richard Lynch
If you are going to sort it by various fields, I'd just throw it into a database... That said, http://php.net/usort should be able to do whatever you want. On Thu, May 10, 2007 2:18 pm, Anna Vester wrote: > Hello all, > > I have a question concerning .CSV array sorting. I have tried googling > fo

Re: [PHP] PHP sorting csv array output

2007-05-10 Thread tg-php
When you load your data into your array, you can use the timezone (or whatever field you're using to sort) as the array key, then use ksort(). Check the "see also" for a bunch of other types of sorting you can do. When it comes to the multisorts and user defined sorts, I'm at a bit of a loss..h

Re: [PHP] PHP sorting csv array output

2007-05-10 Thread Anna Vester
On 5/10/07, Daniel Brown <[EMAIL PROTECTED]> wrote: One place to start reading, Anna, would be the PHP manual for the fgetcsv() function, which is specifically for CSV parsing. http://www.php.net/fgetcsv Thanks for your quick reply Daniel. Yes I've seen that function before and i am u

Re: [PHP] PHP sorting csv array output

2007-05-10 Thread Daniel Brown
One place to start reading, Anna, would be the PHP manual for the fgetcsv() function, which is specifically for CSV parsing. http://www.php.net/fgetcsv On 5/10/07, Anna Vester <[EMAIL PROTECTED]> wrote: Hello all, I have a question concerning .CSV array sorting. I have tried googling fo

[PHP] PHP sorting csv array output

2007-05-10 Thread Anna Vester
Hello all, I have a question concerning .CSV array sorting. I have tried googling for an answer and have tried different techniques, but nothing seems to works as I would like it to work. Here is my situation: Test file is located here: http://veanndesign.com/test.php I would like to be able to