How do I print the name of the field for a submission a value?
The Webform submission object's data parameter is a keyed array of component ID's/component submission data. The object doesn't contain the component field name so you'll need to reference its value through data attached on the node.

For example:

$webform_node = node_load($submission-&gt;nid);
foreach ($submission-&gt;data as $cid =&gt; $data) {
  print $webform_node-&gt;webform['components'][$cid]['name'] . ':' . $submission-&gt;data[$cid][0];
}