xpath('//D:entry')); $opensearch = $xml->children('opensearch', TRUE); global $pager_page_array, $pager_total; $pager_page_array[0] = ($page - 1); $pager_total[0] = ceil($opensearch->totalResults / $opensearch->itemsPerPage); $contents .= theme('pager', NULL, $opensearch->itemsPerPage, 0); } else { $contents .= 'Error'; } } return $contents; }