> Thanks, its working fine now, actually a little better than I expected :-) > Dont understand the logic though, if you find time point me to the correct > place where i can read up and figure out the logic you used.
The logic isn't too hard. You're on page X. You show links to other pages from X minus 5 to X plus 5. So if you're on page 15, you show links for pages 10 - 20. Those adjust dynamically based upon the current value of $page. The min() and max() bits are just easy ways to ensure you don't create links for pages below 1 or above $numofpages. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php