I have an XML line from a XML file:
<issue>
<host ip="10.10.5.6">http://www.testing.com</host>
It is clear that I can read the host (http://www.testing.com) like this:
$simple = file_get_contents('/directory/test1.xml');
$test = new SimpleXMLElement($simple);
echo $test ->issue[1]->host;
But how can I read host ip (10.10.5.6) ?
Thank you for the help!
Solution: echo $test ->issue[1]->host[ip];