title: Populate dropdown with SQL Query, append value to begining of array , and echo selected
body: <p>I want to create a drop-down using a SQL query, append "All" as first option text with a value of "" or add it to the beginning of the array and then have the drop-down remember the selection after I post.  This is my code:</p>
  
  <pre><code>&lt;label for="formMeet"&gt;Meet:&lt;/label&gt;
  &lt;?php
  $query_meet = "SELECT distinct Meet FROM `RESULTS_final` order by Date DESC";
  $meetlist = mysql_query($query_meet);
  array_unshift($meetlist, "All");
  echo "&lt;select name='formMeet'&gt;";
  while ($row = mysql_fetch_array($meetlist)) {
      echo "&lt;option value='" . $row['Meet'] . "';
      if($_POST['formMeet'] == $row['Meet'])
          echo "selected = 'selected'";
      echo "&gt;" . $row['Meet'] . "&lt;/option&gt;";
  }
  echo "&lt;/select&gt;";
  ?&gt;
  </code></pre>
  
  <p>I broke the code trying to echo the selected results and array_unshift is not working to append "All" to the beginning of my list.  The enumerated version of the drop-down looks like this:</p>
  
  <pre><code>&lt;label for="formMeet"&gt;Meet:&lt;/label&gt;
  &lt;select name="formMeet"&gt;
  &lt;option value=""&gt;All&lt;/option&gt;
  &lt;option value="TEAM5 &amp; TEAM4 @ TEAM3 7/19/2016" &lt;?php if($_POST['formMeet'] == "TEAM5 &amp; TEAM4 @ TEAM3 7/19/2016") { echo "selected=\"selected\""; } ?&gt;&gt;TEAM5 &amp; TEAM4 @ TEAM3 7/19/2016&lt;/option&gt;
  &lt;option value="TEAM2 @ TEAM1 7/19/2016" &lt;?php if($_POST['formMeet'] == "TEAM2 @ TEAM1 7/19/2016") { echo "selected=\"selected\""; } ?&gt;&gt;TEAM2 @ TEAM1 7/19/2016&lt;/option&gt;
  &lt;option value="TEAM2 @ TEAM5 7/12/2016" &lt;?php if($_POST['formMeet'] == "TEAM2 @ TEAM5 7/12/2016") { echo "selected=\"selected\""; } ?&gt;&gt;TEAM2 @ TEAM5 7/12/2016&lt;/option&gt;
  &lt;option value="TEAM4 @ TEAM3 7/12/2016" &lt;?php if($_POST['formMeet'] == "TEAM4 @ TEAM3 7/12/2016") { echo "selected=\"selected\""; } ?&gt;&gt;TEAM4 @ TEAM3 7/12/2016&lt;/option&gt;
  &lt;option value="TEAM5 @ TEAM4 7/5/2016" &lt;?php if($_POST['formMeet'] == "TEAM5 @ TEAM4 7/5/2016") { echo "selected=\"selected\""; } ?&gt;&gt;TEAM5 @ TEAM4 7/5/2016&lt;/option&gt;
  &lt;option value="TEAM3 @ TEAM1 7/5/2016" &lt;?php if($_POST['formMeet'] == "TEAM3 @ TEAM1 7/5/2016") { echo "selected=\"selected\""; } ?&gt;&gt;TEAM3 @ TEAM1 7/5/2016&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>It works, but since there are always new meets, I would like to use the database to populate the drop-down.</p>