I want to get id,competitionId,competitionDisplayName of games in the JSON data.My current code doesn't output anything could any one tell me what i am doing wrong.Thanks
$json_string = 'https://webws.365scores.com/web/games/?langId=27&timezoneName=Asia/Hebron&userCountryId=-1&appTypeId=5&sports=1&startDate=17/08/2019&endDate=17/08/2019';
$json = file_get_contents($json_string);
$array = json_decode($json);
foreach($array as $values)
{
$output = $values->games['competitionDisplayName'] . "\n";
}
echo $output;