Are you talking about something like this?
$foo = array(
'something' => 25,
'another_thing' => 'fubar'
);
foreach($foo as $name => $value) {
echo "<div><label>".ucfirst(str_replace('_', ' ', $name)).": <input type='checkbox' name='$name' value='$value'></label></div>\n";
}