yeah str_replace did it, actually preg_replace did even better job..
this is how i solved it, for anyone who's interested in solution
for the querystring: id=12&orderby=name&noframe=true
$qs = $_SERVER['QUERY_STRING'];
print preg_replace("/(orderby)=\w+/i", "$1=age", $qs);
the output is: id=12&orderby=age&noframe=true
thanks for the idea LordShryku