Jump to content

Regarding accessing an element


dragunov

Recommended Posts

HEy Guys

Here is a snippet of an array:

 

SimpleXMLElement Object

(

    [report1] => SimpleXMLElement Object

        (

            [ReportHost] => Array

                (

                    [0] => SimpleXMLElement Object

                        (

                            [HostName] => 192.168.2.34

                            [startTime] => Thu Dec 17 13:58:49 2009

                            [stopTime] => Thu Dec 17 15:13:13 2009

                            [netbios_name] => (unknown)

                            [mac_addr] => (unknown)

                            [dns_name] => (unknown)

                            [os_name] => (unknown)

                            [num_ports] => 2

                            [num_lo] => 0

                            [num_med] => 0

                            [num_hi] => 0

                            [ReportItem] => Array

which is printed using print_r($a)

now how can i access [HostName] => 192.168.2.34 in the $a array??

Thanks in advance

 

Link to comment
https://forums.phpfreaks.com/topic/211150-regarding-accessing-an-element/
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.