PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
$doc = new DomDocument;
// We need to validate our document before refering to the id
$doc->validateOnParse = true;
$doc->Load('index.html');
echo "The element whose id is books is: " . $doc->getElementById('books') . "\n";
?>
Last edited by Benjamin on Tue May 26, 2009 12:59 pm, edited 1 time in total.
Reason:Changed code type from text to php.