I'm getting tickets for the Zendesk api, but I do not know how to give a foreach in the result by echoing the indexes.
$subdomain = "meusubdominio";
$username = "[email protected]";
$token = "xxx";
$client = new ZendeskAPI($subdomain);
$client->setAuth('basic', ['username' => $username, 'token' => $token]);
$getTickets = $client->tickets()->findAll();
How do I give a foreach in $ getTickets, to echo the indexes? For example, I want to echo all indexes ["url"].
I know the example below is wrong, but it is to exemplify what I would like to do with the results.
I imagine you have to do some processing on $ getTickets before you get this result. I just do not know what to do.
Ex:
foreach($getTickets as $Tct):
echo "<p>{$Tct['url']}</p>";
endforeach;
If I give a var_dump to it, I have the results as:
object(stdClass)#53 (4) { ["tickets"]=> array(11) { [0]=> object(stdClass)#45 (31) { ["url"]=> string(50) "https://......