title: How to alphabetical sort php while loop variable?
body: <p>i am selecting an id from a table and then by id getting name of all members by their ids. Now the problem is that , how to sort name ($uname) alphabetically?  It could be simple but i am stuck ..thanks for the help!! 
  Code below - </p>
  
  <pre><code>$sql= mysql_query("Select DISTINCT(`Supervisor ID`) from `list`  ");
  
  while($row = mysql_fetch_array($sql))
  {   
       $id = $row['Supervisor ID'];
       $query = "SELECT `Name` from `list` WHERE `ID` = '$id'  ";
       $name = mysql_query($query);
  
       $username = mysql_fetch_array($name);
  
       $uname = $username['0'];
  
  
       $Supervisor .="&lt;OPTION VALUE=\"$uname\"&gt;".$uname.'&lt;/option&gt;';
  
  }
  </code></pre>