title: Get Text from a Div with specific ID's using DOM (getElementById help)
body: <p>I have the following code snippet I'm trying to get the text from:</p>
  
  <pre><code>&lt;span class="article-title1"&gt;&lt;div id="user-sub-summary"&gt;Love to get text&lt;/div&gt;&lt;/span&gt;
  &lt;div id="user-sub-intro"&gt;&lt;p&gt;this is my intro paragraph&lt;/p&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I'm trying to get just the text in the  with the id "user-sub-summary"
  Ultimately I'm going to get this text and display it in an editable textbox so people can change this if they would like.</p>
  
  <p>my existing code looks like this ($intro = the html snippet above):</p>
  
  <pre><code>$dom = new DOMDocument;
  $dom-&gt;loadHTML($intro);
  var_dump($dom-&gt;getElementById('user-sub-summary'));
  </code></pre>
  
  <p>This just returns 'NULL' on the page - but I can't figure out why.  I've tried searching here, I've googled, I've looked everywhere to try and figure this out but have come up empty handed.</p>