PHP requires query keys with multiple values to have [] at the end. For example:
<input name="key[]" />
<input name="key[]" />
The reason this is frustrating is, when I use CURL in PHP, the PHP implementation of CURL won't convert the array back appropriately. Instead, it just passes key=Array
.
I don't want to build the query string from scratch, because I might be transferring files at the same time (which requires CURLOPT_POSTFIELDS to be an array)
curl_setopt($CURL, CURLOPT_POSTFIELDS, $arguments);
Any ideas how to get this to work? I want CURL to format the query string the way PHP would expect to see it if there were multiple values for one key.