Hi all,
I needed one of these for a website I am recoding that has like 10,000 pages. They want to be able to jump around without having a huge amount of links. They also wanted it fast and ajax-ready.
Here are two versions of the same paginator function. It performs almost the same if you have 20 pages or 2 million pages. The reason I made two versions is you can choose to code around disabled javascript.
JavaScript Version
PHP Version
There is also a live example.
When I searched these forums I got the 500 hits for "pagination", so I know it's like "oh gee, thanks Zab. just what we needed!" I felt that this scheme was worth sharing though.