putting url parameter in array

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
php 4.x

I'm developing a website and when the user clicks on a menu the code behind
the website have to update the url with new data... All parameters are in
the url... So I want the parameters in the url copied to an array wich I

However I'm not sure whats the best way to access these parameters add put
them in an array I created.... I want the parameters copied to an array, and
this array should be designed so that I can access every item in the array
directly. for example like this:
$art = $params['articleid'] (the value of item articleid is copied over to

How should I access these parameters in url and get them placed in an array?
I've looked at $_server['query_string'] and $_server['http_host'] and I'm
NOT sure one of them are the correct one to use...
What do you recommend me to use?


Re: putting url parameter in array

Jeff wrote:

Quoted text here. Click to load it

I think you want $_GET.

On a page "test.php?foo=1&bar=2" then $_GET['foo'] will equal 1 and
$_GET['bar'] will equal 2.

Toby A Inkster BSc (Hons) ARCS
Contact Me  ~ http://tobyinkster.co.uk/contact

Site Timeline