title: Checkbox Array only showing checked values - PHP
body: <p>I have a form with many checkboxes.</p>
  
  <p>ex.</p>
  
  <pre><code>...
  &lt;input name="dodatkowe[]"  type="checkbox" value="1" /&gt;
  &lt;input name="dodatkowe[]"  type="checkbox" value="1" /&gt;
  &lt;input name="dodatkowe[]"  type="checkbox" value="1" /&gt;
  ...
  </code></pre>
  
  <p>I want to have all the checkboxes in the array. Array 'dodatkowe'.</p>
  
  <p>When i checked all checkboxes have:</p>
  
  <pre><code>Array ( [0] =&gt; 1 [1] =&gt; 1 [2] =&gt; 1 ) 
  </code></pre>
  
  <p>but when i checked example only second I have:</p>
  
  <pre><code>Array ( [0] =&gt; 1 ) 
  </code></pre>
  
  <p>I need that, when i check example second checkbox:</p>
  
  <pre><code>Array ( [0] =&gt; 0 [1] =&gt; 1 [2] =&gt; 0)
  </code></pre>