You are here

function theme_wordstream_stats_report in WordStream Keyword Tools 6

Same name and namespace in other branches
  1. 7 wordstream.module \theme_wordstream_stats_report()
1 call to theme_wordstream_stats_report()
wordstream_keyword_stats_report_page in ./wordstream.module
Displays keyword stats report

File

./wordstream.module, line 391

Code

function theme_wordstream_stats_report($analysis) {
  $hdrs = array(
    t('Term'),
    t('Frequency'),
  );
  $rows = array();
  foreach ($analysis['analysis'] as $v) {
    $row = array(
      $v[0],
      number_format($v[1]),
    );
    $rows[] = array(
      'data' => $row,
      'id' => 'kid-' . $values['kid'],
    );
  }
  $attr = array(
    'id' => 'kwresearch-result-table-' . check_plain(str_replace(' ', '-', $analysis['inputs']['keyword'])),
    'class' => 'kwresearch-result-table',
  );
  $output = '<div id="kwresearch-result-block-' . check_plain(str_replace(' ', '-', $analysis['inputs']['keyword'])) . '" class="kwresearch-result-block">';
  $output .= theme_table($hdrs, $rows, $attr);
  return $output;
}