get value of <h2> of html page with PHP DOM?
<p>I have a var of a HTTP (craigslist) link <code>$link</code>, and put the contents into <code>$linkhtml</code>.  In this var is the HTML code for a craigslist page, <code>$link</code>.</p>

<p>I need to extract the text between <code>&lt;h2&gt;</code> and <code>&lt;/h2&gt;</code>.  I could use a regexp, but how do I do this with PHP DOM? I have this so far:</p>

<pre><code>$linkhtml= file_get_contents($link);
$dom = new DOMDocument;
@$dom-&gt;loadHTML($linkhtml);
</code></pre>

<p>What do I do next to put the contents of the element <code>&lt;h2&gt;</code> into a var <code>$title</code>?</p>
