Possible Duplicate:
How to grab URL parameters using PHP?
I was wondering how can I store each url parameter each in there own new variable when I don't know how deep the url parameters are?
Here is an example of a URL value.
Here is my PHP script.
$url = $_SERVER['QUERY_STRING'];
$query = array();
if(!empty($url)){
foreach(explode('&', $url) as $part){
list($key, $value) = explode('=', $part, 2);
$query[$key] = $value;
}
}