title: Unchecked Check-boxes are not fetched in array variable
body: <p>I want to get a string in <strong>"000000"</strong> this pattern of following array of check boxes respectively.</p>
  
  <p><strong>checked = 1, Unchecked = 0</strong></p>
  
  <p><strong>ex. "010101" , "100001"</strong></p>
  
  <p>But <strong>$_POST['check']</strong> method only fetch <strong>checked</strong> check-boxes values and because of this I'am not getting the exact required pattern string that I want.</p>
  
  <p><strong>Number of check-boxes may be vary.</strong></p>
  
  <p>Please help me to get the exact pattern of <strong>"000000"</strong> string.</p>
  
  <pre><code>&lt;body&gt;
  &lt;form action="test.php" method="POST"&gt;
      &lt;input type="checkbox" name="check[]"&gt;
      &lt;input type="checkbox" name="check[]"&gt;
      &lt;input type="checkbox" name="check[]"&gt;
      &lt;input type="checkbox" name="check[]"&gt;
      &lt;input type="checkbox" name="check[]"&gt;
      &lt;input type="checkbox" name="check[]"&gt;
  
      &lt;input type="submit"&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p><strong>test.php</strong></p>
  
  <pre><code>&lt;?php
  
  $ary = $_POST['check'];
  $str = '000000';
  foreach ($ary as $key =&gt; $value)
  {
      $str[$key] = $value? 1 : 0 ;
  }
  echo $str;
  </code></pre>