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->country) { $rows[] = array($str_current_country, $response->wider_dissemination, $response->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' => $header, 'rows' => $rows)); The test works for me. Maybe something in your response value is messing with it?