Add View Result Count

Put the following into the header or footer to display something like;

Showing 1-4 of 7 results.

<?php
 
global $pager_page_array, $pager_total_items, $pager_total;
 
$my_view = views_get_current_view();
 
$items_per_page = $my_view->pager['items_per_page'];
  if (
$pager_total[0] == 1) {
    echo
t('Showing <b>!pager_total_items</b> results', array('!pager_total_items' => $pager_total_items[0]));
  } else {
   
$start = 1 + ($pager_page_array[0] * $items_per_page);
   
$end = (1 + $pager_page_array[0]) * $items_per_page;
    if (
$end > $pager_total_items[0]) {
     
$end = $pager_total_items[0];
      echo
t('Showing !start-!end of <b>!pager_total_items</b> results', array('!start' => $start, '!end' => $end, '!pager_total_items' => $pager_total_items[0]));
    }
  }
?>

Contact Me

Feel free to contact me.

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.