Hi,
I think there is a global php variable that contains an array, in which all the query variables of the current url are stored.

i.e, you are on a page, the url is : "www.domain.com/page.php?var1=foo1&var2=foo2", and you want this global variable to return such an array :
$???[0][0]>>var1
$
???[0][1]>>foo1
$???[1][0]>>var2
$
???[1][1]>>foo2

Now that this must be clear (I hope at least..), my question is : What's the name of this global variable ?
Thank you.

    URL-appended variables (GET variables) are available in the $HTTP_GET_VARS array.

    To peruse that array, try something like:

    while(list($k,$v)=each($HTTP_GET_VARS)) {
    	echo $k . "=" . urldecode($v) . "<br />";
    }
    

      This is what I was looking for, thanks ( This is edited, I replied dumb things since it's 12:26 where I live, and I'm a bit tired 😉 ).

      My second question is a bit similar. I wish to get the name of the "fragment", the string that is after the "#" in the url, without using the php parse_url() function; Just by using another global variable.. Is it possible?

      Thanks.

        I'm not sure if PHP has a function for that, though I kinda doubt it...

        You could always use the strstr() function:

        
        $url = "http://www.domain.com/index.php#jake";
        echo strstr($url,"#");
        
        // will print "#jake";
        

          Yes, that should work, but unfortunately, that was not really what I was looking for. They should add a Global Variable for the fragment part of the URL, just to spare some processing time.
          Thanks.

            Write a Reply...