Zend
200-710 · Question #163
200-710 Question #163: Real Exam Question with Answer & Explanation
Sign in or unlock 200-710 to reveal the answer and full explanation for question #163. The question stem and answer options stay visible for context.
Question
Consider the following XML code:
<?xml version="1.0" encoding="utf-8"?>
<books>
<book id="1">PHP 5.5 in 42 Hours</book>
<book id="2">Learning PHP 5.5 The Hard Way</book>
</books>
Which of the following SimpleXML calls prints the name of the second book? (Let $xml = simplexml_load_file("books.xml"); ) (Choose 2)Options
- Aecho $xml->books->book[2];
- Becho $xml->books->book[1];
- Cecho $xml->book[1];
- Decho $xml->xpath("/books/book[@id=2]");
- Eecho $c = $xml->children(); echo $c[1];
Unlock 200-710 to see the answer
You've previewed enough free 200-710 questions. Unlock 200-710 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.