title: PHP & MySQLi - Show selected value two time in drop-down list
body: <p>I created my profile page with show all data in form from MySQL. All data is show rightly on form and also in drop-down list. But the problem is selected value is shows two time in the option list. </p>
  
  <p>Here is the my code:</p>
  
  <pre><code>&lt;select class="form-control" name="country" id="country"&gt;
       &lt;option value=""&gt;Select Country
           &lt;?php
              //Get country list from Country master
              $qry = "select * from country_master";
              //Execute query
              $result = mysqli_query($conn, $qry);
              //Assigned fetched array to $Country
              while($country = mysqli_fetch_array($result))
              {
                echo "&lt;option value='$country[1]'&gt;$country[1]&lt;/option&gt;";
                //Compare User Country with country list. $row[4] is the country column in user table
                if($row[4] == $country[1])
                   echo "&lt;option value='$country[1]' selected='selected'&gt;$country[1]&lt;/option&gt;";
              }
           ?&gt;
        &lt;/option&gt;
  &lt;/select&gt;
  </code></pre>