Order a variable to display from the highest to lowest value
<p>my code below will echo the position of the user if the number($nm) fall
between the range so let say i have $nm = (10,4,3,3,1) respectively the position will be (staff,staff,staff,marketer,staff) instead of (marketer,staff,staff,staff,staff) how can i arrange so that marketer come first (marketer,staff,staff,staff,staff).</p>

<pre><code>$query = "SELECT DISTINCT username,num FROM user ORDER BY num DESC LIMIT 5";
$result = mysql_query ($query) or die('query error');
while( $line = mysql_fetch_assoc($result)){

$um = $line[username];
$nm = $line[num];

echo "name:$um";

if($nm &lt;= 50){
echo "Position: president";
}else if($nm &lt;= 40){
echo "Position: vice";
}else if($nm &lt;= 30){
echo "Position: manager";
}else if($nm &lt;= 20){
echo "Position: marketer";
}else if($nm &lt;= 10){
echo "Position: staff";
}
</code></pre>
