PHP Load Content From Div Via LoadHTML
<p>i have some problems to retreive the HTML of a specefic div containing the class name "tabEmbed"</p>

<p>The code works but for some reason, it only returns the txt ... no HTML. All the text formating is striped out ... normaly there should be embed code as well. What did i miss?</p>

<pre><code>    $dom = new DOMDocument;
    @$dom-&gt;loadHTML($Video_Source_HTML);
    $Div_Data           = $dom-&gt;getElementsByTagName('div');

    foreach($Div_Data as $Div) {
     if ($Div-&gt;getAttribute('id') === 'tabEmbed') {
      $Embed_HTML = $Div-&gt;nodeValue;
      if(preg_match('/&lt;input type="text"(.*?)"&gt;/is', $Embed_HTML, $Embed)) {
       $Embed_Code = $Embed[1];
      }
     }
    }
</code></pre>

<p>Website Video Embed Code Source</p>

<pre><code>      &lt;div id="tabEmbed" class="tab"&gt;
        &lt;h3 class="blackTitle"&gt;Embed this video to your site with this code:&lt;/h3&gt;

        &lt;input type="text" name="media_embed_code" id="mediaEmbedCodeInput" size="110" onclick="this.focus();this.select();" value="&amp;lt;iframe src=&amp;quot;&amp;quot; frameborder=0 width=510 height=400 scrolling=no&amp;gt;&amp;lt;/iframe&amp;gt;"&gt;
      &lt;/div&gt;
</code></pre>

<p>$Embed_HTML Source:<br />
Embed this video to your site with this code:</p>
