i have succesfully integrated the SendinBlue v3 API into my codeigniter application, but for some reason i'm unable to loop trough the results when using the API.
When i var_dump, my object looks like this :
object(SendinBlue\Client\Model\GetEmailCampaigns)#110 (1) {
["container":protected]=>
array(2) {
["campaigns"]=>
array(2) {
[0]=>
array(23) {
["id"]=>
int(2)
["name"]=>
string(12) "Testcampagne"
["type"]=>
.....
Since the root object is protected , i'm not able to loop trough this to see my campaigns. I was able to read it by converting it to an array , $result = (array)$result; and then i had to use
foreach ($result as $campaigns)
{
foreach ($campaigns as $campaignh)
{
foreach ((array)$campaignh as $campaign)
{
echo $campaign['status'];
....
I'm sure there must be a way to loop trough the campaigns in one single foreach? Feeling really stupid about this!
Thank you!