Here's a possible solution.
Step 1, Create an empty array.
Step 2, Evaluate each checkbox in a loop. If empty, push a 0 into the array. Else, push a 1 into the array.
Step 3, Implode the array using a comma as the "string glue":
<?php
if(isset($_REQUEST["submit"])){
$checkarray = array();
$numCheckBoxes = 5; //number of checkboxes to evaluate
for($i=1; $i<=$numCheckBoxes;$i++){
if(empty($_REQUEST["check".$i])){
array_push($checkarray,0);
}else{
array_push($checkarray,1);
}
}
$checkstring = implode(",",$checkarray);//create comma separated string from array
echo $checkstring;//outputs:1,0,1,1,0
}
?>
This code assumes that the checkboxes are named check1,check2,check3,check4,check5...