You are here

function kwresearch_count_sort in Keyword Research 6

Same name and namespace in other branches
  1. 7 kwresearch.module \kwresearch_count_sort()
1 string reference to 'kwresearch_count_sort'
kwresearch_get_keyword_stats_data in includes/stats.inc
Generates analysis data for keyword stats report. Data is generated by

File

./kwresearch.module, line 1076

Code

function kwresearch_count_sort($a, $b) {
  $a_count = is_array($a) && isset($a['_searches']) ? $a['_searches'] : 0;
  $b_count = is_array($b) && isset($b['_searches']) ? $b['_searches'] : 0;
  if ($a_count == $b_count) {
    return 0;
  }
  return $a_count > $b_count ? -1 : 1;
}