I have some PHP code that generates dynamic tables of data on the fly. By clicking various links you "refine" the tables of data. What I'd like is each of these links to retain the current GET information and add to it. IE:
$allPreviousVars = ???; // Could be 20+ vars
echo "<a href='".$allPreviousVars."&newVar=2'>Link</a>";
I can think of ways to do it by iterating through $_GET with a loop, but surely there is a quicker way to do this?