RonnyNishimoto
08-14-2012, 08:07 PM
Hello!
I was able to get the content by ID and tag names, but I am wondering how can I just get all the contents from a text file (which doesn't have any markup)?
<?php
$doc = new DomDocument;
$doc->validateOnParse = true;
$doc->loadHtml(file_get_contents("test.html"));
$t = ($doc->getElementById("patch"));
print $t->nodeValue;
?>
Thanks :)
I was able to get the content by ID and tag names, but I am wondering how can I just get all the contents from a text file (which doesn't have any markup)?
<?php
$doc = new DomDocument;
$doc->validateOnParse = true;
$doc->loadHtml(file_get_contents("test.html"));
$t = ($doc->getElementById("patch"));
print $t->nodeValue;
?>
Thanks :)