i’ve a pagination code in my project
but the problem is in the links
i get in links something like post?pid=2&page=2&page=3%page=6
I am trying to strip out the page
Here is an example
site.com/post.php?pid=12&page=10
site.com/category.php?cid=120&page=2
I am trying to get this results
site.com/post.php?pid=12
site.com/category.php?cid=120
Best to do something like that would be to use regular expressions.
You could use preg_replace to replace whatever looks like &page=something by an empty string.
This should work :