when using cURL in php to send data in a POST, you use set the cURL option CURLOPT_POSTFIELDS to the data
here's some example data
array('foo'=>'bar','ninja'=>'pirate')
now here's where i'm confused.
half of the example code i've seen do some preprocessing on the array, and encode and smush the data into a properly formatted url string.
turning our data array into: "foo=bar&ninja=pirate"
and then setting that string as the data to CURLOPT_POSTFIELDS
but the other half of the examples i've seen just pass the array directly to CURLOPT_POSTFIELDS and thats it.
the confusing part comes in that they both do the job. given that they both work, i dont think either one can be said to be "correct".
the only advantage i can see of doing the string method is that you can set a parameter into the url that doesnt have a value like "foo=bar&awesome&ninja=pirate"
, and i dont know if you can do that via a associative array, since you cant have a key with out a value (i dont think), but it seems like a waste of memory, since your duping the whole array into a string