bmm bmm - 1 year ago 117
PHP Question

How to get a string from a stdclass object

So when I

I get
object(stdClass)#250 (1) { ["return"]=> string(7) "Success" }

Question, how can I get the "success" from the object in PHP?

Thank you.

Answer Source

In PHP to access an object's property you can use this syntax:


In your case should be

echo $result->return;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download