How do you build an array for a curl post in php without overwriting the previous field? The headers show me the following in the post:
Content-Disposition: form-data; name="price[][unit]"
One
-----------------------------122371200014463
Content-Disposition: form-data; name="price[][price]"
50
-----------------------------122371200014463
Content-Disposition: form-data; name="price[][unit]"
Two
-----------------------------122371200014463
Content-Disposition: form-data; name="price[][price]"
95
-----------------------------122371200014463
Content-Disposition: form-data; name="price[][unit]"
Three
-----------------------------122371200014463
Content-Disposition: form-data; name="price[][price]"
140
I keep overwriting the previous item when I try to build the array like this:
$postPrice['price[][unit]'] = 'One';
$postPrice['price[][price]'] = $one;
$postPrice['price[][unit]'] = 'Two';
$postPrice['price[][price]'] = $two;
$postPrice['price[][unit]'] = 'Three';
$postPrice['price[][price]'] = $three;