Struggling with this problem for an hour now and searched both stackoverflow and google and couldn’t find an answer that helped. I have the following from xdebug:
- list (array)
-[0] (object)
---id (string)
---proj_name (string)
---proj_desc (string)
I am trying to pull out the value of id. Can anyone tell me how to do this? Thank you.
$listis an array containing an object at position0, therefore this object can be accessed with$list[0]id, which can be accessed with$object->idIf you have more than one object in the array, then you can loop through the values contained in the array with
foreach. For example:This will take each object in the array and display its
idvalue.