Pagination Class in PHP