Zend PHP 5.3 Certification 200-530 Question # 6 Topic 1 Discussion

Zend PHP 5.3 Certification 200-530 Question # 6 Topic 1 Discussion

200-530 Exam Topic 1 Question 6 Discussion:
Question #: 6
Topic #: 1

How can the id attribute of the 2nd baz element from the XML string below be retrieved from the SimpleXML object found inside $xml?

One

Two


A.

$xml->getElementById('2');


B.

$xml->foo->bar->baz[2]['id']


C.

$xml->foo->baz[2]['id']


D.

$xml->foo->bar->baz[1]['id']


E.

$xml->bar->baz[1]['id']


Get Premium 200-530 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.