title: Want to show checkbox for each line
body: <p>Currently, in our office website, there is a userinput textbox and after inserting, results from database will be shown below. There are 4 results <code>Lot ID, Product, EWSFLOW and Zone</code>.Among them, only zone is different. I want to do that <code>Lot ID, Product and EWSFlow</code> must show at once and if that entered values have 5 different zones, Zone must shown <code>Zone: 1,2,3,4,5</code>. <strong>&lt;&lt; First problem has been solved.</strong> And right now, I tried to add check boxes for each zone and checkbox must shown beside each zone. But currently, checkboxes are showing at the top. Also, count of the checkboxes must be same as Zones. lets say if the inserted value have 5 zones, it has to show 5 checkboxes besides of it (Example: Zone : [checkbox] 1).
  <a href="https://i.stack.imgur.com/Oj6OB.png" rel="nofollow noreferrer">Checkboxes are showing at top</a></p>
  <pre><code>    echo &quot;&lt;table id='corwafer'&gt;&quot;;
  $arr = array();
  
  while ($row = mysqli_fetch_assoc($result1)) {
  
  $field1name = $row[&quot;lotid&quot;];
  $field2name = $row[&quot;product&quot;];
  $field3name = $row[&quot;ewsflow&quot;];
  $field4name = $row[&quot;zone&quot;];
  $key = $field1name + &quot;:&quot; + $field2name + &quot;:&quot; + $field3name;
  
  if (!in_array($key, $arr)){
      echo &quot;&lt;tr&gt;&quot;;
      echo &quot;&lt;th &gt;Lot ID:&lt;/th&gt;&quot;;
      echo &quot;&lt;td &gt;$field1name&lt;/td&gt;&quot;;
      echo &quot;&lt;/tr&gt;&quot;;
  
      echo &quot;&lt;tr&gt;&quot;;
      echo &quot;&lt;th&gt;Product:&lt;/th&gt;&quot;;
      echo &quot;&lt;td&gt;$field2name&lt;/td&gt;&quot;; 
      echo &quot;&lt;/tr&gt;&quot;;
  
      echo &quot;&lt;tr&gt;&quot;;
      echo &quot;&lt;th&gt;EWSFLOW: &lt;/th&gt;&quot;;
      echo &quot;&lt;td&gt;$field3name&lt;/td&gt;&quot;; 
      echo &quot;&lt;/tr&gt;&quot;;
  
      array_push($arr, $key);
  }
  
  echo &quot;&lt;tr&gt;&quot;;
  echo &quot;&lt;th&gt;Zone:&lt;/th&gt;&quot;;
  echo &quot;&lt;input type='checkbox' name='chkzone' value='chkzone'&gt;&quot;;
  echo &quot;&lt;td&gt;$field4name&lt;/td&gt;&quot;; 
  echo &quot;&lt;/tr&gt;&quot;;
  
  }
  
  echo &quot;&lt;/table&gt;&quot;;
  </code></pre>