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 -
$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 .="<OPTION VALUE=\"$uname\">".$uname.'</option>';
}