{
"profiles": {
"0": {
"profiletoken": "73E327BEA-B550-4F73-831F-",
"age": {
"description": "Leeftijd",
"answer_type": "numeric_value",
"answerdata": "28"
},
"nickname": {
"description": "Profielnaam",
"answer_type": "text",
"answerdata": "SlamDunk-1981"
},
"1":
"nickname": {
"description": "Profielnaam",
"answer_type": "text",
"answerdata": "stefann2"
}
}
De data is gevuld met dit soort json data:
$characters = json_decode($data,true); // decode the JSON feed
var_dump($characters);
foreach ($characters as $character) {
// echo print_r($character);
echo $character['profiles'][1];
}
Maar de loop zegt :
"e: Undefined index: profiles in"
Ik snap er niks meer van