Level 9
Maybe a nested foreach?
foreach($apiResponse as $items) {
if($items) {
foreach($items as $subitem) {
dd($subitem);
}
}
}
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have the following dd from a API query:
array:22 [▼
0 => array:3 [▼
0 => {#436 ▼
+"applicationInstance": "_definst_"
+"name": "myAmsterdam"
+"sourceIp": "rtmp://xx.xx.xx.xx:{portnumber}"
+"isRecordingSet": false
+"isStreamManagerStream": false
+"isPublishedToVOD": false
+"isConnected": true
+"isPTZEnabled": false
+"ptzPollingInterval": 2000
+"ptzPollingIntervalMinimum": 1000
}
1 => {#418 ▶}
2 => {#409 ▶}
]
1 => []
2 => []
3 => []
4 => array:3 [▶]
5 => []
]
How will I be able to itterate over this so I can call the data from "name" and "isConnected" ?
Please or to participate in this conversation.