UPDATE: I have revised my code and I now can display current page but it shows 0 for first page. and when they move onto more pages it shows current page and previous pages. How do I get it to show a set number of pages.
<div id="paging">
<div class="page">
<?php if ($pageNum_getDisplay > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_getDisplay=%d%s", $currentPage, 0, $queryString_getDisplay); ?>">First</a>
<?php } // Show if not first page ?></div>
<div class="page">
<?php if ($pageNum_getDisplay > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_getDisplay=%d%s", $currentPage, max(0, $pageNum_getDisplay - 1), $queryString_getDisplay); ?>">Previous</a>
<?php } // Show if not first page ?></div>
<div class="page">
<?php for ($i=0;$i<=$pageNum_getDisplay;$i++){
if ($pageNum_getDisplay==$i)
echo ($i);
else
echo "<a title='Page $i' href='?pageNum_getDisplay=$i'><strong>$i</strong></a>";
} ?> </div>
<div class="page">
<?php if ($pageNum_getDisplay < $totalPages_getDisplay) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_getDisplay=%d%s", $currentPage, min($totalPages_getDisplay, $pageNum_getDisplay + 1), $queryString_getDisplay); ?>">Next</a></div>
<div class="page">
<?php } // Show if not last page ?>
<?php if ($pageNum_getDisplay < $totalPages_getDisplay) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_getDisplay=%d%s", $currentPage, $totalPages_getDisplay, $queryString_getDisplay); ?>">Last</a>
<?php } // Show if not last page ?>
</div>
I want to display it so it looks like this.
(first page) 1 2 3 4 5 6 7 Next Last (second page) First Previous 1 2* 3 4 5 6 7 Next Last
right now it looks like this .. First Previous 0 1 2 Next Last
Thanks in advance