title: How to retrieve all data from database using select option in php?
body: <p>So I have this <code>table</code> from my <code>database</code> that I want to <code>echo out</code> using <code>select</code> <code>option</code>. But I'm having trouble because I have an <code>option</code> where the user can add more options and I don't know how to set the value of it. Can you help me about it guys? thanks!</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>    &lt;?php 
  
        while(mysqli_stmt_fetch($stmt)) { 
  
      ?&gt;
  
  &lt;select class="form-control input-sm"&gt;
        &lt;option value="ABLE SEAMAN" &lt;?php if($boiler_size == 'ABLE SEAMAN') { echo "selected"; } ?&gt;&gt;ABLE SEAMAN&lt;/option&gt;
        &lt;option value="AKO ITO" &lt;?php if($boiler_size == 'AKO ITO') { echo "selected"; } ?&gt;&gt;AKO ITO&lt;/option&gt;
        &lt;option value="APPRENTICE" &lt;?php if($boiler_size == 'APPRENTICE') { echo "selected"; } ?&gt;&gt;APPRENTICE&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>