I have the following returned after setting up a SOAP call to add a new user to a web service.

object(stdClass)#342 (1) { ["Subscriber.AddResult"]=> object(stdClass)#341 (2) { ["Code"]=> int(0) ["Message"]=> string(7) "Success" } } 

Now I need to access the Message variable, but I can't seem to get the damn thing. I can;t seem to var_dump the Subscriber.AddRedult part because of that period.

有帮助吗?

解决方案

Enclose the property name in mustaches and quotes:

echo $object->{'Subscriber.AddResult'};
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top