是否可以使用PHP更改/更新URL中的查询字符串?

Is it possible to programatically change the query URL within PHP? I know I can use the $_GET['something'] function to get data from a URL query, but I don't know how to change a query string programatically in PHP.

This is an example of what I want to do:

//---- index.php ----\\    
$variable = 23;

And my URL is: http://example.com/index.php?variable=23

So if I make $variable = 10 later on in the program (not using headers, and not hard-coded into a link), I want to be able to programatically update the query URL, so that my URL will now read:

http://example.com/index.php?variable=10

Is this even possible, without using forms?

header("Location: index.php?variable=10");

or do you mean

$_GET['variable'] = 10; 

?