Logic behind pagination like google
What is the logic behind google's pagination behaviour? My paginator goes something like this: [1] 2 3 ... 184 > < 1 [2] 3 4 ... 184 > < 1 2 [3] 4 5 ... 184 > < 1 2 3 [4] 5 6 ... 184 > < 1 ... 3 4 [5] 6 7 ... 184 > < 1 ... 4 5 [6] 7 8 ... 184 > < 1 ... 5 6 [7] 8 9 ... 184 > < 1 ... 6 7 [8] 9 10 ... 184 > Here is a live version of the above example: http://www.dev.thomaskile.me/?page=test-zone&module=Paginator . I know why this is happening; I've set the amount of page numbers to be shown on each side of current page to two (2). I would rather have the range of numbers to be equal like this: [1