src/Guzzle/Http/QueryString.php
private function convertKvp($name, $value)
    {
        if ($value === self::BLANK || $value === null || $value === false) {
            return $name;
        } elseif (!is_array($value)) {
            return $name . $this->valueSeparator . $value;
        }

        $result = '';
        foreach ($value as $v) {
            $result .= $this->convertKvp($name, $v) . $this->fieldSeparator;
        }

        return rtrim($result, $this->fieldSeparator);
    }
private function convertKvp($name, $value)
    {
        if ($value === self::BLANK || $value === null || $value === false) {
            return $name;
        } elseif (!is_array($value)) {
            return $name . $this->valueSeparator . $value;
        }

        $result = '';
        foreach ($value as $v) {
            $result .= $this->convertKvp($name, $v) . $this->fieldSeparator;
        }

        return rtrim($result, $this->fieldSeparator);
    }
private function convertKvp ( $ name , $ value ) { if ( $ value === self :: BLANK || $ value === null || $ value === false ) { return $ name ; } elseif ( ! is_array ( $ value ) ) { return $ name . $ this -> valueSeparator . $ value ; } $ result = '' ; foreach ( $ value as $ v ) { $ result .= $ this -> convertKvp ( $ name , $ v ) . $ this -> fieldSeparator ; } return rtrim ( $ result , $ this -> fieldSeparator ) ; }
Converts a key value pair that can contain strings, nulls, false, or arrays
into a single string.

@param string $name  Name of the field
@param mixed  $value Value of the field
@return string
Converts a key value pair that can contain strings nulls false or arrays into a single string .