Holy Grail Pagination in PHP