First off, welcome to the community

!
There are actually two types of these predominantly used to pass variables to various documents. You've probably seen them when browsing websites. Typically, but certainly not always, they consist of key/value pairs.
Example:
Code:
http://www.example.com/index.php?var1=I Love&var2=TalkPHP
Those are what we call GET variables. The other type are POST variables and they are sent with the HTTP request. They are in the same format as the GET variable (In key/value style) but are hidden away from the user as they are not present in the URL.
What I mean by key/value pairs is that the first item is the key, and the second being its value. Take a look at the following as shown in our example:
In there
var2 would be the key, and
TalkPHP is the value for that key.
Now that we know that, to answer your question. Using our example again we would extract the value
TalkPHP from the URL using
$_GET['var2'];. If you're currently knowledgeable about
arrays, then
$_GET is simply one big array that contains all the variables passed to it via GET (Not POST, for POST we have
$_POST).
In your example, the GET variable
a can be set to 1 or 2, or not at all. That is why there is an
if statement checking its value.
To tie this up, using our above example of:
Code:
http://www.example.com/index.php?var1=I Love&var2=TalkPHP
We could print "I Love TalkPHP" by referencing the 2 keys (
var1 and
var2):
php Code:
/* GET: var1=I Love&var2=TalkPHP */echo $_GET[
'var1'] .
' ' .
$_GET[
'var2']
/* Prints: I Love TalkPHP
I hope I have explained it well for you

Please let me know if not.