title: PHP get checkbox value in checked/unchecked
body: <pre><code>&lt;?php
  
  // $groups is fetch_array from mysql
  foreach($groups as $group) {
      if ($group['delete_user'] === 'Y') {
          $checked = "checked=\"checked\";
      }
      else {
          $checked = '';
      }
  ?&gt;
      &lt;input type = "checkbox" name="delete_user[&lt;?php echo $group['id']; ?&gt;]" &lt;?php echo $checked; ?&gt;&gt;
  &lt;?php
  
  }
  ?&gt;
  </code></pre>
  
  <p>Will output:</p>
  
  <pre><code>&lt;form action="test.php" method="post"&gt;
      &lt;input type="checkbox" name="delete_user[1]"&gt;
      &lt;input type="checkbox" name="delete_user[2]"&gt;
      &lt;input type="checkbox" name="delete_user[3]"&gt;
      &lt;input type="checkbox" name="delete_user[4]" checked="checked"&gt;
      &lt;input type="submit" name="save_action" value="Save"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And when I check inputs as wanted, then this will process input.</p>
  
  <pre><code>&lt;?php
  if(isset($_POST['save_action']) {
      if (empty($_POST['delete_user'])) {
          $_POST['delete_user'] = array();
      }
      foreach($_POST['delete_user'] as $del) {
          is_checked($del); //@todo 
      }
  }
  ?&gt;
  </code></pre>
  
  <p>I am looking for way to check if check-box is checked and return proper value ( Y or N ). In this point I declared is_checked() function for this purpose.</p>