Ack. Is sorting this array possible?

From: Date: Thu, 29 Jun 2000 16:50:15 +0000
Subject: Ack. Is sorting this array possible?
Groups: php.general 
Request: Send a blank email to php-general+get-3841@lists.php.net to get a copy of this message
Greetings, Thanks for taking the time to look at this! I'm not too good with anything more than a simple one-dimensional array... Doh! I have text files with dates in them. I open the file, read the date and put the date and the file into an array. I want to sort the array by the date in the file so that when I use a for() loop I can display them in an HTML <UL> in the order of the dates in the file, the newest on top. As of now, the array looks like this: >$key = mktime( 0, 0, 0, $test_month2, $test_day, $test_year ); >$link = "\t<LI><A >HREF=\"./recaps.php3?&filename=$file">$f_subj</A>\r"; >$link_array = array( "date" => "$key", "link" => >"$link", "id" => "$c" ); $c is incremented each time an variable is put in so it's like the index key for me to use in the for() loop to print out the array later. There's probably some easier way to do this or even an easy function to do this, but I can't figure it out... any help would be great. Thanks! -- C. Marcera ========== Press Enterprise, Inc. Computer & Network Services

« previous php.general (#3841) next »