Fairly new to PHP and trying to figure out something that I can't get my head around too.
I have a URL below where I want to remove &page_number=x. The page_number variable and the number has to be removed with the function, which will always be at the end of the string.
I have tried a few versions of preg_replace but I am not having any luck.
Thanks