Home > other >  Parse error: Unclosed '{' does not match ')' in display-btc.php on line 5 PHP
Parse error: Unclosed '{' does not match ')' in display-btc.php on line 5 PHP

Time:02-10

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:

  •  Tags:  
  • Related