protected function buildRecursive($key, $value)
    {
        $url = '';
        if (is_array($value)) {
            foreach ($value as $key2 => $val) {
                if ($part = $this->buildRecursive($key . '[' . $key2 . ']', $val)) {
                    $url .= ($url ? '&' : '') . $part;
                }
            }
        } else {
            $url .= ($url ? '&' : '') . urlencode($key) . '=' . urlencode($value);
        }

        return $url;
    }
protected function buildRecursive($key, $value)
    {
        $url = '';
        if (is_array($value)) {
            foreach ($value as $key2 => $val) {
                if ($part = $this->buildRecursive($key . '[' . $key2 . ']', $val)) {
                    $url .= ($url ? '&' : '') . $part;
                }
            }
        } else {
            $url .= ($url ? '&' : '') . urlencode($key) . '=' . urlencode($value);
        }

        return $url;
    }
protected function buildRecursive ( $ key , $ value ) { $ url = '' ; if ( is_array ( $ value ) ) { foreach ( $ value as $ key2 => $ val ) { if ( $ part = $ this -> buildRecursive ( $ key . '[' . $ key2 . ']' , $ val ) ) { $ url .= ( $ url ? '&' : '' ) . $ part ; } } } else { $ url .= ( $ url ? '&' : '' ) . urlencode ( $ key ) . '=' . urlencode ( $ value ) ; } return $ url ; }
arrays in request

@param string $key
@param string|array $value
@return string
arrays in request