title: How to get the html inside a $node rather than just the $nodeValue
body: <h2>Description of the current situation:</h2>
  
  <p>I have a folder full of pages (pages-folder), each page inside that folder has (among other things) a div with <code>id="short-info"</code>.<br>
  I have a code that pulls all the <code>&lt;div id="short-info"&gt;...&lt;/div&gt;</code> from that folder and displays the text inside it by using <code>textContent</code> (which is for this purpose the same as <code>nodeValue</code>)</p>
  
  <p><b>The code that loads the divs:</b></p>
  
  <pre><code>&lt;?php
  $filename = glob("pages-folder/*.php");
  sort($filename);
  foreach ($filename as $filenamein) {
      $doc = new DOMDocument();
      $doc-&gt;loadHTMLFile($filenamein);
      $xpath = new DOMXpath($doc);
      $elements = $xpath-&gt;query("*//div[@id='short-info']");
  
          foreach ($elements as $element) {
              $nodes = $element-&gt;childNodes;
              foreach ($nodes as $node) {
                  echo $node-&gt;textContent;
              }
          }
  }
  ?&gt;
  </code></pre>
  
  <p>Now the problem is that if the page I am loading has a child, like an image: <code>&lt;div id="short-info"&gt; &lt;img src="picture.jpg"&gt; Hello world &lt;/div&gt;</code>, the output will only be <i>Hello world</i> rather than the image and then <i>Hello world</i>.</p>
  
  <h2>Question:</h2>
  
  <p>How do I make the code display the full html inside the div id="short-info" including for instance that image rather than just the text?</p>