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 <i>'header' =></i> in the theme function to be either $header or $html and it will display the data. However when I add in <i>'rows' =></i>, 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->country) { $str_current_country = $response->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' => $header, 'rows' => $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->country) { if ($i == 0) { $rows[] = $str_current_country; $rows[] = $response->wider_dissemination; } $i = $i + 1; $rows[] = $response->response; } } return $rows; }