im sure this would be a simple fix but im lost as to where to place the sort function in this.
<select class="form-control" name="unit"><option></option>
<?php
$query=mysqli_query($db, "SELECT * FROM units") or die(mysqli_error($db));
while($row=mysqli_fetch_array($query))
{
if(!in_array($row["id"], $units)){?>
<option value="<?php echo $row["id"];?>"><?php echo $row["unitsn"];?></option>
it imports all the data i want just looks to be sorted as old on top new on bottom. i would like it ascending in alphabetic order if possible.