$content = file_get_contents(http://www.domain.com/page.html);
$dom = new DOMDocument();
if (!@$dom->loadHTML($content)) die ("Couldn't load file?");
$title = $dom->getElementById("cssid");
$data['heading'] = $title->nodeValue; // this works fine
p
特定のID内にあるすべてのタグを選択できるようにしたいと思います。Jqueryを使用すると、Iiは$('#mycssid p');のようなことをします。
DOMDocumentクラスを使用してこれを行うにはどうすればよいですか