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

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

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

Consider the following XML code:

PHP 5 Power Programming

Learning PHP 5

Which of the following SimpleXML calls print the name of the second book?

(Let $xml=simplexml_load_file("books.xml");) (Choose 2)


A.

echo $xml->books->book[2];


B.

echo $xml->books->book[1];


C.

echo $xml->book[1];


D.

echo $xml->xpath("/books/book[@id=2]");


E.

$c = $xml->children(); echo $c[1];


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.