Firstly, when you're working with variables of this type (ie, ones defined before the script executes), you should be using the superglobals that correspond. For example, for $PHP_SELF, you would be using - $_SERVER['PHP_SELF'] . This is to provide more security. You can read more about them here.
Now, what you need to do what you want is the QUERY_STRING keye of the $_SERVER superglobal. You would use it like this:
echo "<a href=\"".$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']."&newvar=2\">Link to self</a>";
(When you're referring to newvar, use $_GET['newvar']) 😉
Hope that helps!
Matt