a challenge like this $_GET[‘2020’] snippet boring me a long time, i want to know how this work, but do not know which keywords to search, maybe how the parameter works?
Advertisement
Answer
$_GET
reads querystring parameters from the URL. So if someone goes to your PHP script with a URL like http://servername/scriptname.php?2020=ABC
then when the PHP script runs, the variable $_GET['2020']
will contain the value ABC
.
More info is available in the documentation: https://www.php.net/manual/en/reserved.variables.get.php