title: Storing db value into php array with while loop?
body: <p>I am wanting to search through AdvInfo table and store the primary keys if Unit = Child.</p>
  
  <pre><code> $result = mysqli_query($conn, "SELECT * FROM AdvInfo WHERE Unit = Child");     
   while ($row = mysqli_fetch_array($result, SQLSRV_FETCH_ASSOC))
   {
  
  $childhbc = array_merge($childhbc, $row[0]);
  echo $childhbc[0];
   }
  </code></pre>