Created
December 7, 2014 13:16
-
-
Save blar/04e67ab2c36ae944dd6b to your computer and use it in GitHub Desktop.
DomNodeList
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $document = new DomDocument(); | |
| $html = $document->createElement('html'); | |
| $document->appendChild($html); | |
| $body = $document->createElement('body'); | |
| $html->appendChild($body); | |
| $link = $document->createElement('a'); | |
| $body->appendChild($link); | |
| $links = $document->getElementsByTagName('a'); | |
| $link = $document->createElement('a'); | |
| $body->appendChild($link); | |
| var_dump($links->length); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment