On the line you give it seems to be set up with the ratios already. All you need to do is do a sort. Best way to do that is to output each persons scores into an array then do a sort() on the array.
using as input data.
7th RECON,SMC ,430 ,144 ,40 ,2.986 ,10
MaRiK USMC* ,220 ,115 ,29 ,1.913, 7
Pilot[PBC]PVT, PBC, 194, 36, 15, 5.389, 12
Enron Exec RR, 191, 34, 9, 5.618, 21
<?
$line[0] = "7th RECON,SMC ,430 ,144 ,40 ,2.986 ,10";
$line[1] = "MaRiK USMC* ,220 ,115 ,29 ,1.913, 7";
$line[2] = "Pilot[PBC]PVT, PBC, 194, 36, 15, 5.389, 12 ";
$line[3] = "Enron Exec RR, 191, 34, 9, 5.618, 21 ";
unset($sortlines);
$thisone=0;
for ( $loop=0; $loop<count($line); $loop++)
{
// split up the data into a useable form.
$bits=explode(",", $line[$loop]);
$sortlines[$thisone]=$bits[4].",";
$sortlines[$thisone].=$bits[0].",";
$sortlines[$thisone].=$bits[1].",";
$sortlines[$thisone].=$bits[2].",";
$sortlines[$thisone].=$bits[3].",";
$sortlines[$thisone].=$bits[5].",";
}
sort($sortlines, SORT_NUMERIC);
for ( $loop=0; $loop<count($sortlines); $loop++ )
{
$bits=explode(",", $sortlines[$loop]);
// output lines here.
}
?>
You probably wont have to split up the fields this is just a demo.
Mark.