Re: Accessing URL parameters
- From: "Aaron Gray" <ang.usenet@xxxxxxxxx>
- Date: Mon, 31 Dec 2007 18:55:45 -0000
"Rik Wasmus" <luiheidsgoeroe@xxxxxxxxxxx> wrote in message
news:op.t37ny0i05bnjuv@xxxxxxxxxxxxxxxx
On Mon, 31 Dec 2007 18:45:07 +0100, Aaron Gray <ang.usenet@xxxxxxxxx>
wrote:
"Rik Wasmus" <luiheidsgoeroe@xxxxxxxxxxx> wrote in message
news:op.t37my9gb5bnjuv@xxxxxxxxxxxxxxxx
On Mon, 31 Dec 2007 18:24:28 +0100, Aaron Gray <ang.usenet@xxxxxxxxx>
wrote:
How do I access URL parameters, and ideally as an associative array ?
Many thanks in adance,
Do you want to examine the URL string?
http://www.php.net/parse_url
http://www.php.net/parse_str
Or in the current request, it's offcourse in the $_GET array.
parse_url() looke helpful, but I wanted the current pages URL parameters,
is
the $_GET ?
The parameters from the query string indeed.
http://www.example.com/path/to/file.ext?foo=foz&bar=baz
...will result in a $_GET array while running file.ext:
array(
'foo' => 'foz',
'bar' => 'baz')
If you want other information as well, search the $_SERVER array for your
needs.
Thanks,
Aaron
.
- References:
- Accessing URL parameters
- From: Aaron Gray
- Re: Accessing URL parameters
- From: Rik Wasmus
- Re: Accessing URL parameters
- From: Aaron Gray
- Re: Accessing URL parameters
- From: Rik Wasmus
- Accessing URL parameters
- Prev by Date: Re: Some strings are not true ?
- Next by Date: Re: Some strings are not true ?
- Previous by thread: Re: Accessing URL parameters
- Next by thread: Some strings are not true ?
- Index(es):
Relevant Pages
|