I\'m having problems with posting a multidimensional array with file uploads using PHP and CURL.
The multidimensional array is for example:
$post[\'q
multipart/form-data doesn't support nested values. And I don't believe CURL can do it either.
I suspect the receiving end of your request is also a PHP script. If, then you can submit a nested array as one of the values, if you just prepare it yourself:
$post['answers[0]'] = "yes";
$post['answers[1]'] = "no";
$post['answers[2]'] = "maybe";
Theoretically you'd just need 'answers[]' without the index, but that would overwrite the preceeding value - and thus only works with http_build_query.
I'm not sure if there is any HTTP library in PHP which can do this automatically.