title: convert part of dom element to string with html tags inside of them
body: <p>im in need of converting part of DOM element to string with html tags inside of them.</p>
  
  <p>i tried following but it prints just a text without tags in side.</p>
  
  <pre><code>$dom = new DOMDocument();
  $dom-&gt;loadHTMLFile('http://www.pixmania-pro.co.uk/gb/uk/08920684/art/packard-bell/easynote-tm89-gu-015uk.html');
  $xpath = new DOMXPath($dom);
  $elements=xpath-&gt;query('//table');
  
  foreach($elements as $element)
  echo $element-&gt;nodeValue;
  </code></pre>
  
  <p>i want all the tags as it is and the content inside tables. can some one help me. it'll be a greate help.</p>
  
  <p>thanks.</p>