title: Get name and value with PHP
body: <p>I have this simple form:</p>
  
  <p><strong>HTML:</strong><br /></p>
  
  <pre><code>&lt;input type="checkbox" name="product[]" value="20$" /&gt; book
  &lt;input type="checkbox" name="product[]" value="30$" /&gt; plane
  </code></pre>
  
  <p><strong>PHP:</strong> <br /></p>
  
  <pre>
  <code>
  $product = $_POST['product'];
  foreach($product as $value) {
      echo $value;
  }
  </code>
  </pre>
  
  <p><strong>Note:</strong><br />
  The user can choose one or two ... products.</p>
  
  <p><strong>Question:</strong><br />
  I want to know if there is a solution to get the <code>name</code> too, like adding an ID class or something ..</p>
  
  <p><em>Basically I cant get the <code>name</code> attribute because I didn't sent it with the form.</em> <br /></p>