I've been using PHP for a few years properly now and there's one thing that's bugged me for a while and I need somebody to give me a hand.
Now, let's say I have a link like this: page.php?1=value1&2=value2
When I add a hyperlink to a page to change 2's value I'd do this: <a href="page.php?2=newvalue">Link</a>
Problem is, 1's value is now lost. So, I created a small script to output the request variables in the address to a string to use in my hyperlinks like this: <a href="page.php<?php echo $urlrequest ?>2=newvalue"></a>
The problem this time is that it will not change the current value of 2, it will just add it to the end like this:
What is the best way to overcome this issue so that I can change current request variables and possibly even remove specific request variables?