Class paging in php