You SHOULD never consider the superglobal variable's elements an actual variable. Very bad practise. Thats like treating $_POST['id'] to $id...
Use the following: $_SERVER['REMOTE_ADDR'] and if you want concatenate it inside a string use this: {$_SERVER['REMOTE_ADDR']}