如何从url获取所有php参数? [关闭]

I am trying to get php parameters from a url. The parameters can be anyting, the url could be http://example.com/?foo=bar&trees=cool&owl=wow or the url could be http://example.com/index.php?chickens=dead. I want it to cycle through the url and get the values. I want to get each value to execute the code $_GET['value from ur'] = what it equals; in a for loop.

Any help is appreciated, also I researched this and there was no answer to be found. Please don't mark it as a duplicate.

$_GET is an array, iterate over it using for each

foreach($_GET as $query_string_variable => $value) {
   echo "$query_string_variable  = $value <Br />";
}
foreach($_GET as $k => $v)
   echo $k . ' - ' . $v . '<br />';