I'm using an API to connect to a third party site which is returning the following results:
stdClass Object
(
[timeFrameStart] => 2017-03-11
[timeFrameEnd] => 2017-03-12
[count] => 1
[fixtures] => Array
(
[0] => stdClass Object
(
[date] => 2017-03-11T15:00:00Z
[status] => FINISHED
[matchday] => 37
[homeTeamName] => Home Team
[awayTeamName] => Away Team
[result] => stdClass Object
(
[goalsHomeTeam] => 0
[goalsAwayTeam] => 0
)
)
)
)
I can get the team names using:
foreach($details->fixtures as $record) {
echo $record->homeTeamName;
}
however I can't seem to figure out how to get the goalsHomeTeam/goalsAwayTeam values from within the result array.