Voici un code simple :
<?php
$nb_ligne=7;
$tableau[1][1] = "Dupont";
$tableau[1][2] = 1;
$tableau[2][1] = "Robert";
$tableau[2][2] = 2;
$tableau[3][1] = "Durand";
$tableau[3][2] = 3;
$tableau[4][1] = "Toto";
$tableau[4][2] = 4;
$tableau[5][1] = "Martine";
$tableau[5][2] = 5;
$tableau[6][1] = "Delphine";
$tableau[6][2] = 6;
$tableau[7][1] = "Caroline";
$tableau[7][2] = 7;
//------------------Tri inverse de 7 à 1
//RSORT($tableau);
//array_multisort($tableau, SORT_ASC, SORT_STRING,
// $tableau, SORT_NUMERIC, SORT_DESC);
//-------Affiche
echo"<center><table border width='50%'>";
for($i=1;$i<=$nb_ligne;$i++)
{
echo"<tr>
<td width='50%' align='center'>".$tableau[$i][1]."</td>
<td width='50%' align='center'>".$tableau[$i][2]."</td>
</tr>";
}
echo"</table></center><br>";
?>
Je n'arrive pas à trier sur la deuxième colonne en ordre décroissant.Merci
Guy