Custom pager "Showing X - Y of Z results" I have some entities queried from an external solr server using custom code and Search API, and I'm listing them 10 per page.

I have created a pager for the page using pager_default_initialize() and theme('pager').

I wanted to insert a text into the pager div that says "Showing X - Y of Z results". I can do this manually by overriding the theme_pager() function, but I was wondering is there a drupal native function or some setting which you can pass to theme_pager that does this?

I suppose in short I want the Views 3 equivalent of "Full pager", instead at the moment I'm only able to produce the "Mini" pager.
In views you can use the below php function and place it in header with php filter

&lt;?php
global $pager_page_array, $pager_total_items, $pager_total;
$my_view = views_get_current_view();
$items_per_page = $my_view-&gt;pager['items_per_page'];
if ($pager_total[0] == 1) {
  echo t('Showing &lt;b&gt;!pager_total_items&lt;/b&gt; results',
    array('!pager_total_items' =&gt; $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 &gt; $pager_total_items[0]) $end = $pager_total_items[0];
  echo t('Showing !start-!end of &lt;b&gt;!pager_total_items&lt;/b&gt; results',
    array('!start' =&gt; $start, '!end' =&gt; $end, '!pager_total_items' =&gt; $pager_total_items[0])
  );
}
?&gt;


See the below is result