0

Given a current page number (p), pages to show (s), and max pages (m), create the classic pagination, marking the current page as active (*) and using ...'s for any outside the range.
For example:
p = 1, s = 5, m = 15
Should output:
1* 2 3 4 5 ... 15
Or
p = 7, s = 5, m = 15
should output
1 .....