I have a pagination script but the additions I've made to it mean that the &page= parameter gets duplicated on each page turn, which is clearly messy.
What I want to do is parse the passed querystring each time, remove the present &page=# so that its ready for the fresh one!
I've tried this from reading many topics...but it doesn't work!! PLEASEEEE HELP ME!!
preg_replace("/&page=[1-50]/", "", $TheCurrentQueryString);
In summary, I want to take the existing querystring parameters and remove anything matching this pattern...
"&page=[1-50]"
(the numeric is a range of possible page numbers).