I have this piece of code to get a simple submission from Formstack
<?php
include 'formstackAPI.php';
$formstack = new FormstackApi('3b86536d709f1c9eeef7a368ac087309');
$formId = 4222971;
$response = $formstack->getSubmissions($formId, $encryptionPassword = '',
$minTime = '', $maxTime = '', $searchFieldIds = array(),
$searchFieldValues = array(), $pageNumber = 1, $perPage = 1, $sort = 'DESC',
$data = false, $expandData = false);
print_r($response);
?>
That shows me on the screen this:
array(1) {
[0]=> object(stdClass)#2 (8) {
["id"]=> string(9) "789936126"
["timestamp"]=> string(19) "2021-04-08 18:38:03"
["user_agent"]=> string(115) "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36"
["remote_addr"]=> string(13) "200.93.50.239"
["payment_status"]=> string(0) ""
["latitude"]=> string(15) "10.631699562073"
["longitude"]=> string(16) "-71.640602111816"
["read"]=> string(1) "0"
}
}
My question is how can I go through this array so that it only print the ["id"] on the screen?