title: printing out html content from domelement using nodeValue
body: <p>I have image in html. I parse it to DOMDocument and start working with it... </p>
  
  <pre><code>$doc = new DOMDocument();
  $doc-&gt;loadHTML($article_header);
  
  $imgs = $doc-&gt;getElementsByTagName('img');
  foreach ($imgs as $img) {
  $container = $img-&gt;parentNode;
  
  if ($container-&gt;tagName != "a") { 
      $image_inside=utf8_decode($img-&gt;nodeValue);
      echo "3".$image_inside;
      die;
  }
  }
  </code></pre>
  
  <p>This code works fine line 3 gets image. line 6 understands that there is no "a" tag above this "img" tag, and line 8 must print out my initial image. But the thing is I only see "3" without image tag and etc...</p>
  
  <p>I did inspect element and nothing is there. just "3" is coming out. Why I cannot print out image ? </p>