i've got `n` checkboxes. If one of them is checked user `id` and `checkbox id` are goin to DB . How can i save checkbox clicked after page reloading. Now i'm facing the problem in the cycle 

```
for ($i = 0; $i < count($arr[3])); $i++){   // $arr - array containing user id and ckeckbox id    
          $active = "";
       if ($arr[3][$i]['id'] != ""){
          $active = "active" // class for active checkbox       

}
$checkbox .= "<div class="check_ '.$active.'"></div>";
}

```

for example if i've got 3 checkboxes and clicking on 1 and 3,an array will be like {1,3,NULL} instead of {1,NULL,3}. i think ckeckbox `id` should be equal to checkbox number