Grab value passed in from URL?

Grab value passed in from URL?

Hi,

I'm trying to grab a value passed in from a URL, i.e:

test.html?foo=bar

...and I would like to grab the "foo" entry, with the value passed in

I'm guessing this can be done, but I can't find a way?

TIA!

Andy