title: Why PHP get empty array from checkbox with the dynamic values?
body: <p>I have a table:</p>
  
  <p><img src="https://i.stack.imgur.com/2usus.png" alt=""></p>
  
  <p>This table returns records from BD. A user can add any person from an entry to the group he created.</p>
  
  <pre><code>&lt;form action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;" method="post"&gt;
           &lt;table class="table table-dark table-bordered"&gt;
              &lt;thead&gt;
              &lt;tr &gt;
              &lt;div class="row"&gt;
                  &lt;th &gt;Add&lt;/th&gt;
                  &lt;th &gt;id&lt;/th&gt;
                  &lt;th &gt;first_name&lt;/th&gt;
                  &lt;th &gt;last_name&lt;/th&gt;
                  &lt;th &gt;Groups&lt;/th&gt;
              &lt;/div&gt;
              &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  &lt;?php foreach($my_subordinates as $my_subordinate):?&gt;
                      &lt;tr&gt;
                          &lt;td &gt;&lt;input type="checkbox" name="grouped[]" value="&lt;?php $my_subordinate['id']?&gt;"&gt;to group&lt;/td&gt;
                          &lt;td &gt;&lt;?php echo $my_subordinate['id'] ?&gt;&lt;/td&gt;
                          &lt;td &gt;&lt;?php echo $my_subordinate['first_name'] ?&gt;&lt;/td&gt;
                          &lt;td &gt;&lt;?php echo $my_subordinate['last_name'] ?&gt;&lt;/td&gt;
                          &lt;td &gt;&lt;?php  ?&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                    &lt;?php endforeach;?&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
              &lt;div class="form-group row"&gt;
                 &lt;label for="name" class="col-4 col-form-label"&gt;Group name&lt;/label&gt; 
                 &lt;div class="col-4"&gt;
                    &lt;input id="group_name" name="group_name" pattern="{2,255}" value="" class="form-control here" type="text" autofocus required&gt;
                 &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-group row"&gt;
                  &lt;div class="offset-4 col-8"&gt;
                      &lt;button name="create_group" type="submit" class="btn btn-primary"&gt;Create&lt;/button&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
           &lt;/form&gt;
  </code></pre>
  
  <p>The value in checkbox gets users id and when user selects some persons, ids must be passed to <code>$ _POST</code>. 
  Here:</p>
  
  <pre><code>if(isset($_POST['create_group']))
  {
     b_dump($_POST);
  }
  </code></pre>
  
  <p>I check <code>$ _POST</code>, when the button 'create_group'is pressed.
  But the array is empty:</p>
  
  <p>here I chose all three employees</p>
  
  <p><img src="https://i.stack.imgur.com/3NFU5.png" alt=""></p>
  
  <p>Why is it like this? 
  <em>If you know simpler ways to add people to groups, I would be interested to know)</em></p>