Wondering why my PHP code will not display all \"Value\" of \"Values\" in the JSON data:
$user = json_decode(file_get_contents($analytics)); foreach($user-&g
$user->data is an array of objects. Each element in the array has a name and value property (as well as others).
$user->data
name
value
Try putting the 2nd foreach inside the 1st.
foreach
foreach($user->data as $mydata) { echo $mydata->name . "\n"; foreach($mydata->values as $values) { echo $values->value . "\n"; } }