I\'m loading a JSON array and decode it to an PHP array
$jsonfile = file_get_contents(\'https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&s
This is because json_decode()
with no parameters attempts to convert your json string to an stdClass object. If you want to convert it to an array, you need to set the 2nd parameters (the $assoc
boolean) to true
:
$json = file_get_contents('LINK TO JSON OUTPUT');
$array = json_decode($json, true);