title: PHP get entire HTML DOM incl. tags
body: <p>how can I extract the whole html dom element incl. tags via php?
  eg. for:</p>
  
  <pre><code>&lt;table id="tab"&gt;
      &lt;tr&gt;
          &lt;td&gt;
              foo
          &lt;/td&gt;
          &lt;td&gt;
              bar
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>i do not want only "foo bar" but the whole "<code>&lt;table id="tab"&gt;&lt;tr&gt;&lt;td&gt;foo&lt;/td&gt;&lt;td&gt;bar&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</code>" basically, i need a way (funciton) to get the whole tag with inner tags and content via it's id.
  Something like getTagViaID('http://www.foo.com', 'bar') -> where 'http://www.foo.com' is the link to the page and 'bar' is the id.</p>
  
  <p>Thank you for your time!</p>