try this...
What this would do, parse the string at the top... like you said..
mypage.php?id=5
and it would turn "id" into a variable, with the value of "5", so you could type..
echo $id;
or whatever, and it would be the value of 5... see? EASY.
$query = $QUERY_STRING;
$query_Array = explode("&", $query);
foreach ($query_Array as $i) {
$doubleItem = explode("=", $i);
$$doubleItem[0] = str_replace("%20", " ", $doubleItem[1]);
}