Jump to content

Object in Array


batman99

Recommended Posts

Hello

I am trying to extract the contents of an object that is contained inside an array.

[code]$result = $response->getNss();
print_r($result);
[/code]

Produces:
[code]Array ( [0] => DomainNs Object ( [name:private] => dns1.dnsserver.com [ip:private] => ) [1] => DomainNs Object ( [name:private] => dns3.dnsserver.com [ip:private] => ) ) [/code]

Could someone please let me know how I can get the contents of the DomainNs object (ie extract DomainNs:name and DomainNs:ip) from the above array into readable variables?  

Any ideas?

Really appreciate the help.
Thanks
Link to comment
https://forums.phpfreaks.com/topic/31982-object-in-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.