Hi list,
I have a csv text file that looks like this:

Mike,1,Monday 12th of February 2001 02:14:09 PM
Bob,3,Monday 12th of February 2001 02:14:17 PM
Marry,2,Monday 12th of February 2001 02:16:38 PM

I'm trying to get it to sort by the 2nd value (number
descending and to show only the top two highest
scores:
Like this..

Bob,3,Monday 12th of February 2001 02:14:17 PM
Marry,2,Monday 12th of February 2001 02:16:38 PM

This is what I have for code now:

// show high scores
        $lines = file("quiz.txt");
        sort($lines);
        for ($ i=0; $i < count ($lines); $i++){
                $thisline = explode(",", $lines[$i]);
                echo "<br>";
                for($j=0; $j < count($thisline);$j++)  { 
                         echo "$thisline[$j]" ;

                }

Is this possible to do?
I'm running linux with php3
Thank you
  --Mike

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to