Why would you have to update any code in PHP?

Code:
for ($i = 0; $i < count($_POST['chk_values']); $i++) {
    //do something with $_POST['chk_values'][$i]
}
You can add as many checkboxes as you want and the loop will always work.