Skip to main content
added 352 characters in body
Source Link
iLLin
  • 609
  • 4
  • 9

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?

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);
}

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?

Source Link
iLLin
  • 609
  • 4
  • 9

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);
}