Why is my theme table row array not being displayed? I have the below code and I know both the $headers and the $html have values stored in them as i can echo them out.
I can also set the 'header' => in the theme function to be either $header or $html and it will display the data.

However when I add in 'rows' =>, no data is displayed.

Can anyone see why?

function emnies_ad_hoc_query_exporter_get_html_formatted_ad_hoc_query_responses($obj_response) {
  $str_current_country = '';

  foreach ($obj_response as $response) {
    if ($str_current_country != $response-&gt;country) {
      $str_current_country = $response-&gt;country;
      $html = emnies_ad_hoc_query_exporter_get_country_row($str_current_country, $obj_response);
    }
  }
  $header = array('Country', 'Wider Dissemination', 'Responses'); 
  $output = theme('table', array(
    'header' =&gt; $header, 
    'rows' =&gt; $html
  ));
  return $output;
}



function emnies_ad_hoc_query_exporter_get_country_row($str_current_country, $obj_response) {
  $rows = array();
  $i = 0;
  foreach ($obj_response as $response) {
    if ($str_current_country == $response-&gt;country) {
      if ($i == 0) {
        $rows[] = $str_current_country;
        $rows[] = $response-&gt;wider_dissemination;
      }
      $i = $i + 1;
      $rows[] = $response-&gt;response;
    }
  }
  return $rows;
}
Try looking at it this way.  From looking at your $header, you are looking for 3 columns?

foreach ($obj_response as $response) {
if ($str_current_country == $response-&gt;country) {
  $rows[] = array($str_current_country, $response-&gt;wider_dissemination, $response-&gt;response);
}


EDIT

// Test Output
$header = array(t('Country'), t('Wider Dissemination'), t('Responses'));
$rows = array();
$rows[] = array('US', 'Extremely Wide', 'Response');
print theme('table', array('header' =&gt; $header, 'rows' =&gt; $rows));


The test works for me.  Maybe something in your response value is messing with it?