sorting list of data in php?
<p>hi i have an list of countries on table so i am sorting with country name then i get A-Z locations like this <code>Afghanistan, Bangladesh,Cape Verde, Denmark,Equatorial Guinea,Falkland Islands,USA, Yemen , Zambia</code>but actually i need USA on top (i mean first element) like this order <code>USA,Afghanistan, Bangladesh,Cape Verde, Denmark,Equatorial Guinea,Falkland Islands, Yemen , Zambia</code>here is my code</p>

<pre><code>&lt;?php
require 'dbconnect.php';
$empty=array();
$c=0;

$query="select * from phpfox_country";
$result=mysql_query($query);

if($result)
{
   while($row=mysql_fetch_row($result))
   {

   if($row[1]=="United States")
   {
   $message=array("country_iso"=&gt;$row[0],"name"=&gt;$row[1])
   }
   else
   {
     $message[$c]=array("country_iso"=&gt;$row[0],"name"=&gt;$row[1]);
   }

     $c++;
   }
  $message=($message==null)?$empty:$message;
}
else
{
$message=array("message"=&gt;"error in code");
}
echo json_encode($message);
?&gt;
</code></pre>

<p>thanks for advance.</p>
