// http://www.example.com/page.php?x=100&y=200 $queries = array(); parse_str($_SERVER['QUERY_STRING'], $queries); echo $queries['x']; // 100 echo $queries['y']; // 200