title: Alphabetically Sort Dropdown values in php/html forms?
body: <p>Please Tell me how to Alphabetically Sort view of Dropdown Values in html/php forms.</p>
  
  <p>Here is the Code :</p>
  
  <pre><code>&lt;select name="bank" id="bank" style='text-transform:uppercase'  required/&gt;
                                                   &lt;option&gt;&lt;/option&gt;
                                                   &lt;?php $bank_name=mysql_query("select * from bank_details")or die(mysql_error()); 
                                                   while ($row=mysql_fetch_array($bank_name)){                                                
                                                   ?&gt;
                                                   &lt;?php
                                                  $bankname = $row['bank_name'];
                                                  $bankname = mb_strtoupper($bankname);
                                                  ?&gt;
                                                  &lt;?php
                                                  $bankifsc = $row['bank_ifsc'];
                                                  $bankifsc = mb_strtoupper($bankifsc);
                                                  ?&gt;
  
                                                   &lt;option style='sort'&gt; &lt;?php echo $bankname ?&gt; - &lt;?php echo $bankifsc ?&gt; &lt;/option&gt;
                                                   &lt;?php } ?&gt;
                                                 &lt;/select&gt;
  </code></pre>