I have the following object:
stdClass Object ( [0] => stdClass Object ( [img_id] => 56 [img_name] => 5c9eeb51930ebe222ab26895dab7c348.png ) )
It is being dumped into a variable called $image_names. I am trying to get the entry for [0].
I have tried:
$image_names->0 but I get the error: syntax error, unexpected T_LNUMBER
I even tried $image_names[0]. I realize this should not work, but I thought I would give it a try. This does not return an error. But, it also does not return the data.
In this object structure, how do I get the object associated with the key [0]?