title: Why is this looping through each id in mysqli_fetch_assoc?
body: <p>I don't understand why this provides a form option tab of each id in the array and not just one of them. Can someone explain? aka: Why is the <code>$id</code> variable not a static number. Thanks!</p>
  
  <pre><code>&lt;form action="form_connect.php" method="post"&gt;
  
    &lt;input type="text" name="username"&gt;
    &lt;input type="password" name="password"&gt;
    &lt;select name="id" id=""&gt;
    &lt;?php
      while($row = mysqli_fetch_assoc($result)){
        $id = $row['id'];
        echo "&lt;option value='$id'&gt;$id&lt;/option&gt;";
      }        
    ?&gt;
    &lt;/select&gt;
    &lt;input type="submit" name="submit"&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/hMECx.png" rel="nofollow noreferrer">result that i'm confused by</a></p>