Hello everyone,

I am trying to retrieve some info from a remote site using PHP DOMDocument and I cannot figure out why the code returns NULL, although the provided ID exists on the page. Please help.

$dom = new DOMDocument("1.0", "utf-8");
$content = $dom->getElementById('yog-content');

Thank you for reply. The result is still NULL and I do not get the error message, even if I have removed '@'. It's strange.

I think the unesaped & on that page is causing this. What you can try is to replace them before loading.