How to output the label of a field in a template? I am overriding the node template for a custom content type, say node-custom.tpl.php.
The content type have some fields that I want to show in columns like this :


|Label1|Data1|
|Label2|Data2|
|Label3|Data3|
|Label4|Data4|


If I use render($content['field_custom_data']) both the data and the label are drawn.
I know how to hide the label from the render using the content type display configuration but I need a solution for the label.
The site is multilanguage if that matters.
This code will print all labels .

     $entity_type = 'node';
     $bundle_name = 'CUSTOM'; //machine name of your content type


  foreach ($node as $key =&gt; $value) {

        $field_name = $key;

        $info = field_info_instance($entity_type, $field_name, $bundle_name);

        $label = $info['label'];

        print $label;
        print "&lt;br&gt;";
   }


You can modify it according to your need.