How can I sort this array by city or by id in descending order?
if ($num > 0 ) {
$i=0;
while ($i < $num) {
$city = mysql_result($result,$i,"city");
$state = mysql_result($result,$i,"state");
$id = mysql_result($result,$i,"id");
echo "$city";
echo "$state";
++$i; } } else { echo "No results."; } ?>