Reputation: 63
I have the following object:
[Suppliers] => stdClass Object
(
[@size] => 1
[name] => Supplier Name
[Supplier] => stdClass Object
(
[@chainCode] => EP
[@id] => 13
)
)
I know how to get the name
property and display it, but I don't know how to get the properties that start with an '@' sign ... What is it and how can I get its value?
Upvotes: 6
Views: 205
Reputation: 101956
It's just properties with a somewhat unusual name. You can fetch them like this:
$object->{'@id'};
Upvotes: 13