Merge pull request #9 from DaniSancas/master

Fixes issue #8 "Nested arrays in data array are encoded at the same level as it's father array"
This commit is contained in:
php-curl-class
2013-12-18 20:50:38 -08:00
+2 -1
View File
@@ -114,7 +114,8 @@ class Curl {
$query[] = urlencode(is_null($key) ? $k : $key . $brackets) . '=' . rawurlencode($value);
}
else if (is_array($value)) {
$query[] = $this->http_build_multi_query($value, $k);
$nested = (is_null($key)) ? $k : $key."[".$k."]";
$query[] = $this->http_build_multi_query($value, $nested);
}
}