Make array of all GET-variables Make array of all GET-variables arrays arrays

Make array of all GET-variables


It's already there by default:

print_r($_GET);  // for all GET variablesprint_r($_POST); // for all POST variables

PHP docs on all available superglobals


There is a $_GET super global array to get all variables from query string.

// print all contents of $_GET arrayprint_r($_GET);// print specific variableecho $_GET['key_here'];

You can also use foreach loop to go through all of them like this:

foreach($_GET as $key => $value){   echo 'Key = ' . $key . '<br />';   echo 'Value= ' . $value;}


GET variables are allready passed as an array