Let\'s say I am getting requests such as:
http://www.example.com/index.php?id=123&version=3&id=234&version=4
Is it possible to extra
Not as rounded or reliable as methods mentioned above but I use this to remove the need to []
in urls without worrying about rewriting.
$aQuery = explode("&", $_SERVER['QUERY_STRING']);
$aQueryOutput = array();
foreach ($aQuery as $param) {
if(!empty($param)){
$aTemp = explode('=', $param, 2);
if(isset($aTemp[1]) && $aTemp[1] !== ""){
list($name, $value) = explode('=', $param, 2);
$aQueryOutput[ strtolower(urldecode($name)) ][] = urldecode(preg_replace('/[^a-z 0-9\'+-]/i', "", $value));
}
}
}