//...snip..
$result = curl_exec($ch);
curl_close($ch);
return $result;
The response of a php curl request is showing as
"{\"result\":\"success\",\"entry\":\"22\",\"confirm\":\"yes\"}"
However, the output should not have \ in front of the quotes.
How do I remove those quotes and return as proper JSON
{
"result":"success",
"entry":"22",
"confirm":"yes"
}
Few options I tried are return print_r($result). This is returning as expected, but I think this is not proper way.
PHP version - 5.6.16