column header data (php)

Each API response contains a column header field that represents the header information of the table. The field is a list (or an array) of objects where each object describes the type of data in the column. The column order is dimensions columns followed by metric columns in the same order as specified in the original query.

private function printColumnHeaders(&results) {
  $html = \'\';
  $headers = $results->getColumnHeaders();

  foreach ($headers as $header) {
    $html .= <<getName()}
Column Type = {$header->getColumnType()}
Column Data Type = {$header->getDataType()}

  print $html;