$numartists = $numartistsarray['num']; /* Start collecting pagination info so we can use it in the title - so we instantiate the paging class */ $Paging = new PagedResults(); $Paging->TotalResults = $numartists; // tell the pager how many results we have $Paging->ResultsPerPage = $resultsperpage; // choose how many results per page, values here override the PagedResults() defaults $Paging->LinksPerPage = 20; // same $Paging->PageVarName = "pagenumber"; // same if (isset($pagenumber)) { // if we have a pagenumber set (from the URL) set that to be the current page in the pager array $Paging->CurrentPage = $pagenumber; } $InfoArray = $Paging->InfoArray(); // creates the infoarray //print("<pre>"); print_r($InfoArray); print("</pre>"); // uncomment to echo the infoarray to see what the pager knows about the page $start_offset = $InfoArray["START_OFFSET"]; $mysql_limit = $InfoArray["MYSQL_LIMIT2"]; $totalpages = $InfoArray['TOTAL_PAGES']; // here we're creating the multi-page navigation element $pagenav as a list $pagenav = "<div class='pagenav'>\n"; /* Print our some info like "Displaying page 1 of 49" */ $pagenav = $pagenav . "<p>Displaying page " . $InfoArray["CURRENT_PAGE"] . " of " . $InfoArray["TOTAL_PAGES"] . "<br/>\n"; $pagenav = $pagenav . "Displaying results " . $InfoArray["START_OFFSET"] . " - " . $InfoArray["END_OFFSET"] . " of " . $InfoArray["TOTAL_RESULTS"] . "</p>\n"; $pagenav = $pagenav . "<div class='pagenav-interface'>"; /* Print our first link */ if ($InfoArray["CURRENT_PAGE"] != 1) { $pagenav = $pagenav . "<ul class='pagenav'>\n<li class='pagenav'><a href='/{$genreurl}/' title='|< first'><img src='/images/arrow-first.png' alt='|< first'></a></li>\n"; } else {