$obj = json_decode($result);
/*
echo"";";
print_r($obj);
echo"
*/
echo $obj->result->Bid;
Great thank you that worked, if I could though one more question :
What is the difference between this out put https://yobit.net/api/3/ticker/swing_btc and the trex one ?
Your answer worked perfectly for trex but not for yobit :
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, 'https://yobit.net/api/3/ticker/swing_btc');
$result = curl_exec($ch);
curl_close($ch);
$obj = json_decode($result);
/*
echo"";
print_r($obj);
echo"
";
*/
echo $obj->result->high;
?>
And
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, 'https://yobit.net/api/3/ticker/swing_btc');
$result = curl_exec($ch);
curl_close($ch);
echo $obj[0]->high;
?>
I understand the Trex being json format but the Yobit one isnt ( is it ? ) so in my mind your original answer from coinmarketcap should have worked
Thanks again