
August 14th, 2003, 08:30 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Location: Melbourne, Australia
Posts: 97
Time spent in forums: 23 m 33 sec
Reputation Power: 6
|
|
Sorting an Array
Hi, i need some help with the following:
-I want to select 3 columns from a table, i.e. rank, name and team.
-I would then like to make an array something like this:
'rank, name, team' for each row.
-So the output should look like:
PHP Code:
rank name team score
5 jack red 12
6 fred red 11
1 john red 8
2 sam red 3
3 jim blue 7
4 joe blue 14
- Before i output the results i want to multiply (rank x score) and then sort the the total in the array using the asort() command.
How do i do this?
__________________
regards,
Fulton
Last edited by DDDooGGG : August 14th, 2003 at 08:35 AM.
|