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?
It's just properties with a somewhat unusual name. You can fetch them like this:
$object->{'@id'};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With