Get field names of view from within module After using views_get_view($view_name) how do I get the names of the fields?  The list of field names (arranged correctly) is going to be pushed onto an array following which will be all the results.  I can see in the return value from views_get_view() the field array, but how do I get them as they would be displayed in a table, that is, correct capitalization, spaces instead of underscores, etc.?
There is an array of fields in the display object:

$view-&gt;display['YOURDISPLAYNAME']-&gt;display_options['fields']


for example if you want to retrieve list of field names of the view arbitrary display, you'd need to do something like this:

function get_views_field_names($view_name, $display = 'default') {
   $view = views_get_view($view_name);
   $result = array();
   foreach($view-&gt;display[$display]-&gt;display_options['fields'] as $field){
       $result[] = $field-&gt;label;
   }
   return $result;
}


and somewhere in the code

$fields = get_views_field_names('YOURVIEWNAME', 'YOURDISPLAYNAME');