<<< Previous question <<< Question ID#0664.md >>> Next question >>>
Consider the following PHP script fragment:
$title = $dom->createElement('title');
$node = ?????
$title->appendChild($node);
$head->appendChild($title);What should ????? be replaced with to add a <title> node with the value of Hello, World!
- A) $dom->appendTextNode($title, "Hello, World!");
- B) $dom->createTextNode("Hello, World");
- C) $dom->appendElement($title, "text", "Hello, world!");
- D) $dom->createElement('text', "Hello, World");
Answer
Answer: A