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
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;}