I am unable to find the character on line 5 which is causing the syntax error. Any help would be greatly appreciated.
<?php
$url = "https://bitpay.com/api/rates";
$json = json_decode(file_get_contents($url));
$dollar = $btc = 0;
foreach($json as $obj){)){
if($obj->code === strtoupper($settings['currency'
echo ' Current Price of BTC:' . ' $'. $obj->rate .' '. $obj->name .' ('. $obj->code .')';
}
}
?>
CodePudding user response: