title: form array of array checkboxes
body: <p>I want to make an array that contains several arrays that store results of checkboxes.</p>
  
  <pre><code>category-&gt;subcategory-&gt;choice
  </code></pre>
  
  <p>I'm not sure if this is even possible but I want something like this maybe:</p>
  
  <pre><code>&lt;input type="hidden" name="category[]" /&gt;
  &lt;input type="checkbox" name="subcat1[]" value="something" /&gt;
  &lt;input type="checkbox" name="subcat1[]" value="somewhere" /&gt;
  &lt;input type="checkbox" name="subcat2[]" value="something" /&gt;
  &lt;input type="checkbox" name="subcat2[]" value="somewhere" /&gt;
  </code></pre>
  
  <p>I want to be able to take the category array loop through it with PHP like this:</p>
  
  <pre><code>foreach($_POST['category'] as $sub){
      switch($sub){
          case 'subcat1':
              foreach($sub as $val){
                  //prepare $val to insert into database X
              }
              break;
          case 'subcat2':
              foreach($sub as $val){
                  //prepare $val to insert into database Y
              }
              break;
      }
  }
  </code></pre>