PHP Pagination - buttons?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm struggling with working pagination in PHP. According to the documentation, I can use those links to go to the next page of the collected results. I can put out a certain amount of results per page, which I want, but I also want to go from page to page - I want to have working "Next", "Previous", "First" and "Last" buttons too.
But, in PHP, I have tried to write the exact equivalents of those, and it doesn't work. See my code:
'<a href="https://my.test.infrastructure.com/courses?page=1&per_page=3" rel="next">Next</a>'
This, unfortunately, don't work. Frankly I don't know what does.
I have seen other threads on this matter, but they have all focused on Python or other languages, so none of them help me. The ones I am working with are PHP foremost, with some Laravel, HTML and Blade.
Any advice? Every bit of help is greatly appreciated