Name of the JSON response in a ForEach in PHP

Questions: I am working on a small projet with a specific JSON API I got this JSON from response of the API. { “3”: { “email”: “email@domain.com”, “ext”: “100”, “location”: “remote”, “name”: “Test Extension”, “protocol”: “sip”, “status”: “enabled”, }, “66”: { “email”: “support@domain.com”, “ext”: “101”, “location”: “remote”, “name”: “Test2”, “protocol”: “sip”, “status”: “enabled”, } } …

arrays – How do I print the outer loops key with foreach in PHP?

Questions: This question already has answers here: Loop through a two-dimensional array (5 answers) Closed 5 hours ago. I need some homework help. I am stuck because I keep getting: ‘Notice: Array to String Conversion’. The assignment specifically says to loop through the two-dimensional associative array with a nested foreach loop. I’ve successfully looped through …