You can't put arrays into strings like that, rewrite the line like this:
echo "<input type=\"checkbox\" name=\"checkbox".$row[0]."\" value=\"checkbox\">
Also, in the other part you need to make the name up with a variable variable like this:
$name = "checkbox".$row[0];
if($$name == \"on\"){
//do stuff
}
Hope that helps