How to extract data from a decoded JSON object in php
<p>I wanted to try to get data from a JSON string which is loaded from another page. I currently have used Curl to get the data from the webpage but I can't acces the data in it. </p>

<p>I've already tried:</p>

<p>var_dump(json_decode($result->version, true)); </p>

<p>var_dump(json_decode($result[3][0]["date"], true));</p>

<p>But this does't seem to work as it always returns NULL</p>

<pre><code>$url="https://roosters.deltion.nl/api/roster?group=AO2B&amp;start=20160125&amp;end=20160201";
//  Initiate curl
$ch = curl_init();
// Disable SSL verification
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// Will return the response, if false it print the response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Set the url
curl_setopt($ch, CURLOPT_URL,$url);
// Execute
$result=curl_exec($ch);
// Closing
curl_close($ch);

// Will dump a beauty json :3
var_dump(json_decode($result, true));
</code></pre>