I'm using a framework at work that I'm slightly unfamiliar with and trying to access elements of an object that are stored within an array called $items. I've tried die(print_r($items[0])) to try to get the first element but it says 0 is an undefined index. Here is the result of print_r($items):
Any help is much appreciated. If you have any questions I'll gladly answer because I know this is a bit vague. I think it would take up way too much space to explain how this framework actually works.
I figured out that the first element is 2 and not 0, but I'm still unable to access any of the elements within the object. When I tried print_r($items[2]->fields) it didn't return anything, just a blank page.