PHP Curl Fatal error on posting Json array on Localhost

QuestionsPHP Curl Fatal error on posting Json array on Localhost
Jehal Desai Staff asked 4 years ago

I use the folowing Php/ Curl code to post an array of data to a webpage. When on my web hosting this is working fine without errors. When testing in local/xampp responds with the error:

Fatal error: Uncaught ValueError: curl_setopt_array(): Argument #2 ($options) must contain only valid cURL options;

curl_setopt_array(Object(CurlHandle), Array) #1 {main} thrown in C:xampphtdocstest.php on line 88

I am looking everywhere but I can't find why this is not working on xampp/local and it has no issues on my hosting..
All help is welcome.
The code:


View on Stack Overflow