<?php
// try this html listing example for all nodes / includes a few getElementsByTagName options:
$file = $DOCUMENT_ROOT. "http://website.com";
$doc = new DOMDocument();
@$doc->loadHTMLFile($file);
// example 1:
$elements = $doc->getElementsByTagName('tr');
$album = $elements->item(1);
echo $album;
我如何将其转换为可以输出到屏幕的数据?它说我不能转换成字符串。我已经读过DOMnode
不像数组一样运行,但它会生成DOMNodeList
。
答案 0 :(得分:1)