I have an array like this:
$pages = (1, 29, 209, 389, 440, 527)
And I want to make simple HTML navigation through these pages. Only 'first', 'last', 'prev' and 'next' links. And when I click the 'next'/'prev' link they had to change accordingly. E.g. when I am at page 389 prev and next to be 209 and 440. If I am at page 440 prev and next to be 389 and 527.