title: Populating an HTML select list from a PHP array
body: <p>I am trying to populate an HTML select list using an array of customer names. I am using the following code, but it does not seem to work. I have a function that query an SQL Server database and gets the names. I know that works fine as I am using it in other code, for some reason when I try to populate the select list it is coming up blank. Would it be better or more efficient to use a <code>for</code> loop? What is the best way to accomplish this?</p>
  
  <pre><code>&lt;select name="customers"&gt;
      &lt;?php
      $custNames = getCustomers();
      foreach($custNames as $customers){
          echo '&lt;option value="' . $customers . '"&gt;' . $customers . '&lt;/option&gt;';
      }
      ?&gt;
  &lt;/select&gt;
  </code></pre>