private function parseQuery($string)
    {
        $return = array();
        $parts = explode("&", $string);
        foreach ($parts as $part) {
            list($key, $value) = explode('=', $part, 2);
            $value = urldecode($value);
            if (isset($return[$key])) {
                if (!is_array($return[$key])) {
                    $return[$key] = array($return[$key]);
                }
                $return[$key][] = $value;
                continue;
            }
            $return[$key] = $value;
        }
        return $return;
    }
private function parseQuery($string)
    {
        $return = array();
        $parts = explode("&", $string);
        foreach ($parts as $part) {
            list($key, $value) = explode('=', $part, 2);
            $value = urldecode($value);
            if (isset($return[$key])) {
                if (!is_array($return[$key])) {
                    $return[$key] = array($return[$key]);
                }
                $return[$key][] = $value;
                continue;
            }
            $return[$key] = $value;
        }
        return $return;
    }
private function parseQuery ( $ string ) { $ return = array ( ) ; $ parts = explode ( "&" , $ string ) ; foreach ( $ parts as $ part ) { list ( $ key , $ value ) = explode ( '=' , $ part , 2 ) ; $ value = urldecode ( $ value ) ; if ( isset ( $ return [ $ key ] ) ) { if ( ! is_array ( $ return [ $ key ] ) ) { $ return [ $ key ] = array ( $ return [ $ key ] ) ; } $ return [ $ key ] [ ] = $ value ; continue ; } $ return [ $ key ] = $ value ; } return $ return ; }
Our own version of parse_str that allows for multiple variables
with the same name.
@param $string - the query string to parse
@return string
Our own version of parse_str that allows for multiple variables with the same name .