Thanks for that, but I can't seem to get it to work.
The thing is, basically I've got a load of arrays containing the information I want, I then output this in a while loop:
while (list ($key, $value) = each($sorting))
{
...
}
Using $array[$key] for each of the arrays in a table format.
$sorting is an array from points, so:
$sorting = $points;
arsort($sorting);
and thats works fine, of course if I do
$sorting = $roundsratio;
arsort ($sorting);
$sorting = $points;
arsort($sorting);
Nothing changes, and arsort won't take two inputs unfortunately :-(
I though using
function compare_two_fields($a,$b)
{ if($a<$b) return -1;
if($a>$b) return 1;
if($a<$b) return -1;
if($a>$b) return 1;
return 0;
}
$sorting = compare_two_fields($points, $roundsratio);
would do it, but it doesn't, any more ideas?