Another possibility to consider is using another array dimension. Instead of the form element being named "apples_red", instead set the name to "apples[red]", "apples[green]", and so forth. Then if you want to know if any apples were received in the post data:
if(isset($_POST['apples']))
{
echo "Yes, apples were selected.<br />";
foreach($_POST['apples'] as $color => $value)
{
echo "$color: $value<br />\n";
}
}