I'm trying to fetch numeric value from the cURL response array. But Unable to do that. I'm Using this code
$urltopost = "http://www.xxxx.yyy.com/zzz.php";
$ch = curl_init ($urltopost);
curl_setopt ($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
$returndata = curl_exec ($ch);
print_r($returndata);
Its prints this Our new Invoice ID is: [{-10191}] on the page. Now I want to fetch 10191 from the array. I tried this one but failed.
$id = abs(filter_var(implode($returndata), FILTER_SANITIZE_NUMBER_INT));
How can i retreive the numeric value?