$_GET contains the keys / values that are passed to your script in the URL.

If you have the following URL :

http://www.example.com/test.php?a=10&b=plop

Then $_GET will contain :

array
  'a' => string '10' (length=2)
  'b' => string 'plop' (length=4)


Of course, as $_GET is not read-only, you could also set some values from your PHP code, if needed :

$_GET['my_value'] = 'test';

But this doesn't seem like good practice, as $_GET is supposed to contain data from the URL requested by the client.

Answer from Pascal MARTIN on Stack Overflow
๐ŸŒ
PHP
php.net โ€บ manual โ€บ en โ€บ reserved.variables.get.php
PHP: $_GET - Manual
This is a 'superglobal', or automatic global, variable. This simply means that it is available in all scopes throughout a script. There is no need to do global $variable; to access it within functions or methods.
๐ŸŒ
W3Schools
w3schools.com โ€บ php โ€บ php_superglobals_get.asp
PHP $_GET Superglobal
In the PHP file we can use the $_GET variable to collect the value of the input fields.
๐ŸŒ
Pi My Life Up
pimylifeup.com โ€บ home โ€บ how to use php $_get global variable
How to use PHP $_GET Global Variable - Pi My Life Up
August 4, 2022 - Below is the URL that we will send to the above PHP script. We named our script get.php and stored it on an accessible local development server. Our query string has bg=beige where name is bg and value is beige. You can access the value by using the name in our GET variable, for example, $_GET['bg'].
๐ŸŒ
YouTube
youtube.com โ€บ watch
PHP Tutorial for Beginners 17 # Using $_GET Variables in PHP - YouTube
get - PHP $_GET Variablephp - How to set $_GET variablePHP - easiest way to get $_GET parameters string as writtenPHP: $_GET php $_requestphp $_get arrayphp ...
Published: August 6, 2014
Find elsewhere
๐ŸŒ
Educative
educative.io โ€บ answers โ€บ php-get
PHP $_GET
August 28, 2020 - $_GET is a PHP superglobal variable and can collect data sent in the URL.
๐ŸŒ
SitePoint
sitepoint.com โ€บ php
Understanding $_get in PHP - A detailed discussion - PHP - SitePoint Forums | Web Development & Design Community
January 1, 2019 - This resource is more like notes of someone who has mastered the language โ†’ http://php.net/manual/en/reserved.variables.get.php But novice like me seems to be struggling even to grasp the basics of $_GET. I know there โ€ฆ
๐ŸŒ
phpBB
phpbb.com โ€บ board index โ€บ phpbb archives โ€บ phpbb 3.0.x forums archive โ€บ 3.0.x modifications forums โ€บ [3.0.x] mod writers discussion
phpBB โ€ข How do I pass a PHP variable (eg. $_GET)?
January 19, 2010 - It did lead me to the phpbb wiki, but I must admit that I don't know how I can use that information to solve my problem. ... You use request_var() to get the contents of your URL parameter. If you want to preserve the parameter, then you should retrieve it in the session functions, and stuff ...
๐ŸŒ
SitePoint
sitepoint.com โ€บ php
PHP How to set $variable = "$_GET['name']" - PHP - SitePoint Forums | Web Development & Design Community
April 23, 2021 - PHP How to set $variable = โ€œ$_GET[โ€˜nameโ€™]โ€; The goal is to update a variable into having the same information as what is used in the query string. when I try to run my code I get this error: Parse error: syntax error, unexpected โ€˜โ€™ (T_ENCAPSED_AND_WHITESPACE), expecting โ€˜-โ€™ or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 255312 โ€บ how-to-get-a-variable-name-as-a-string
php - How to get a variable name as a string? - Stack Overflow
Say i have this PHP code: $FooBar = "a string"; i then need a function like this: print_var_name($FooBar); which prints: FooBar Any Ideas how to achieve this? Is this even possible in PHP?
๐ŸŒ
InformIT
informit.com โ€บ articles โ€บ article.aspx
Accessing Form Variables | PHP Crash Course | InformIT
If the form was submitted via the POST method, the data entered in the tireqty box will be stored in $_POST['tireqty']. If the form was submitted via GET, the data will be in $_GET['tireqty']. In either case, the data will also be available in $_REQUEST['tireqty']. These arrays are some of the superglobal arrays. We will revisit the superglobals when we discuss variable scope later in this chapter. Letโ€™s look at an example that creates easier-to-use copies of variables. To copy the value of one variable into another, you use the assignment operator, which in PHP is an equal sign (=).