Re: PHP sorting csv array output
| From: | tg-php at gryffyndevelopment dot com | Date: | Thu, 10 May 2007 19:44:29 +0000 |
| Subject: | Re: PHP sorting csv array output | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-254756@lists.php.net to get a copy of this message | ||
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..hah.. just
never had to use them so they're still a bit mystical to me.
-TG
http://us2.php.net/manual/en/function.ksort.php
= = = Original message = = =
On 5/10/07, Daniel Brown <parasane@gmail.com> 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 using it to parse the file, which displays fine. I just need
to be able to sort that data (by Time Zone) prior to displaying. Sorry
If I wasn't clear.
Thanks.
--
Anna Vester
Web Designer
http://www.veanndesign.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.