title: getting a checkbox array value from POST
body: <p>i am posting an array of checkboxes. and i cant get it to work. i didnt include the proper syntax in the foreach loop to keep it simple. but it is working. i tested in by trying to do the same thing with a text field instead of a checkbox and it worked with the textfield.</p>
  
  <pre><code>&lt;form method="post"&gt;
  &lt;?php 
  foreach{
  echo'
  &lt;input id="'.$userid.'" value="'.$userid.'"  name="invite[]" type="checkbox"&gt;
  &lt;input type="submit"&gt;';
  }
  ?&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>here is the part that is not working. it is echoing 'invite' instead of array. </p>
  
  <pre><code>&lt;?php
      if(isset($_POST['invite'])){
  $invite = $_POST['invite'];
  echo $invite;
  }
  </code></pre>