Nice piece of code. One suggestion, you could try out is that you don't need to use 2 foreach
loops. json_decode
when set to TRUE
returns an associative array. So you can just call the index of the array. Like:
echo "<b>HIVE : </b>" . $hiveprice['USD'] . "</br>";
echo "<b>HBD : </b>" . $hbdprice['USD'];
And it will display just like the loops. Happy coding!
Oh, thanks that’s simplify it a lot!!