How would I be able to show 24 open, high & low on my site made with php
A lot of the code you are sharing is unnecessary and unrelated to working with APIs in PHP. 

It's 3 basic steps. Define the URL of the API endpoint you want, fetch that URL in PHP, return the values to your page. 

Here's a simple example:

&lt;?php
//define API endpoint
$url = "https://api.gdax.com/products/BTC-USD/stats";

//fetch the url and convert the JSON into an associative array
$fgc = json_decode(file_get_contents($url), true);

//assign values to variables
$open = $fgc["open"];
$high = $fgc["high"];
$low = $fgc["low"];
$close = $fgc["close"];
?&gt;
&lt;html&gt;
&lt;h1&gt;My Website&lt;/h1&gt;
&lt;p&gt;Bitcoin 24 HR stats&lt;/p&gt;
Open: $&lt;?php echo $open; ?&gt;&lt;br&gt;
High: $&lt;?php echo $high; ?&gt;&lt;br&gt;
Low: $&lt;?php echo $low; ?&gt;&lt;br&gt;
Close: $&lt;?php echo $close; ?&gt;&lt;br&gt;
&lt;/html&gt;