1

I'm submitting a POST form submission using CURL, and have an array of fields. One of the fields is an array, but is submitted to the server as foo=1&foo=2&foo=3. If I store the values like so: $data['foo'][] = 1; $data['foo'][] = 2; $data['foo'][] = 3, then http_build_query converts it to foo[0]=1&foo[1]=2....

Other than manually appending the string onto the output of the http_build_query for the other fields, how can I achieve this type of array-to-string conversion?

user3791372
  • 4,445
  • 6
  • 44
  • 78

0 Answers0