How can I display a Codeigniter 3 pagination as JSON? |
I don't think this will work out.
Code: $this->pagination->create_links() This code as far as I know only generates HTML template. I had a similar issue and I have created custom library that can output it as JSON object. To create the pagination you need the total pages count and amount of results per page. Code: $res['max_pages'] = ceil($totalImagesCount / MAX_RESULTS_PER_PAGE); This is some example code I have used. I hope I help you a bit! |
Messages In This Thread |
How can I display a Codeigniter 3 pagination as JSON? - by Ajax30 - 08-31-2019, 07:18 AM
RE: How can I display a Codeigniter 3 pagination as JSON? - by milengardev1994 - 08-31-2019, 12:09 PM
|