Can someome provide code or pseudo-code for how the paging links on StackOverflow are generated?
I keep racking my brain but can\'t think of a decent way to build th
Well, if you know the current page, it's pretty trivial to just subtract the number by 1, and add it by 1, then check those numbers against the bounds and display the first and last page always, then if they aren't in sequence, add the ellipses.
Or are you asking about getting the total number of pages and determining the current page number...?