Hi Here is what I have so far, a simple 5 columns which I want sorting into any order I wish. Can anyone help what is needed above and below the array_multisort so the <tr> line displays in the wanted order?
Taken from a database...
Once I understand the concept I can continue with the other 14 odd columns...
LIMIT 6
or die(mysql_error());
$num_six = mysql_num_rows($get_six);
echo "<table>";
$i="0";
while($data = mysql_fetch_array($get_six)) {
$tid[$i] = $data[Id];
$leagueid[$i] = $data[league_id];
$divid[$i] = $data[divs];
$opname[$i] = $data[name];
if ($divid[$i] == "") { $divid[$i] = "0"; }
$both[$i] = $tid[$i]+$div[$i];
if(is_array($tid[$i])){
array_multisort( $divid, SORT_DESC, $tid, SORT_DESC, $both, SORT_ASC, $opname, SORT_ASC, $leagueid, SORT_ASC, $data);
}
echo "<tr><td>$opname[$i]</td><td>$tid[$i]</td><td>$leagueid[$i]</td><td>$divid[$i]</td><td>$both[$i]</td></tr>";
$i++;
}
echo "</table>";
cheers
Rory 😕