diff --git a/src/Url.php b/src/Url.php index eff949a..c50954a 100644 --- a/src/Url.php +++ b/src/Url.php @@ -538,12 +538,17 @@ class Url { * * @param string $url The URL * @param string $parameter The parameter name - * @param string|null $value The parameter value (optional) + * @param string|array|null $value The parameter value (optional) * @param boolean $encode Set if parameter value must be URL encoded (optional, default: true) * * @return string The completed URL */ public static function add_url_parameter($url, $parameter, $value=null, $encode=true) { + if (is_array($value)) { + foreach($value as $v) + $url = self :: add_url_parameter($url, $parameter."[]", $v); + return $url; + } if (strpos($url, '?') === false) $url .= '?'; else