I have a JSON data.
When I write echo $response;
My scree is:
results: 1,
paging: {
current: 1,
total: 1
},
response: [
{
predictions: {
winner: {
id: 217,
name: "SC Braga",
comment: "Win or draw"
},
win_or_draw: true,
under_over: null,
goals: {
home: "-2.5",
away: "-2.5"
},
advice: "Double chance : SC Braga or draw",
percent: {
home: "45%",
draw: "45%",
away: "10%"
}
},
...etc
I need predictions segment inside response.
I try to echo $response['response']['predictions']['winner']->name
Also I try to
$response['response'] = $a
and foreach($a as $k){ echo $k;}
But all of them does not work.
How can solve this problem?