I have this:
[1]=>
object(SimpleXMLElement)#6 (1) {
[\"@attributes\"]=>
array(14) {
[\"name\"]=>
string(5) \"MySQL\"
[\"acknowledg
Kind of messy, but I used this successfully
foreach($xml->data->children() as $child) {
//var_dump($child);
foreach ($child->attributes() as $a => $b) {
echo $a . '=' . $b . '
';
}
}
Not sure why, but the OpsView API returns a two-dimensional array instead of just having one value per XML node :(
echo $child['name'];
works and is much more elegant, thank you.