ok so the goal of this file to read the titles from some xml feed, and modify a file I have locally. I have gotten the simplexml to work, but everything went downhill when I added the simple html dom. When I run the file, I keep getting:
Creating default object from empty value
I have looked at other solutions on stack overflow that seemed to work for others, such using:
$title = new stdClass;
So I'm not so sure what the problem is. Thanks for your help in advance.
require("simple_html_dom.php");
$html = file_get_html('../index.html');
$xml = simplexml_load_file("https://www.figurescreed.moe/feed/") or
die("Error: Cannot create object");;
for ($x = 0; $x < 3; $x++) {
$title = new stdClass;
$element = new stdClass;
$title = $xml->channel->item[$x]->title;
$element = $html->find('div[id=title]');
$element[$x]->innertext = $title;
echo $html;
}
?>