title: PHP DOM, Find the text within a certain div
body: <p>I am currently working a developer tracker for a game without using regex. I have hit a road block when trying to parse html at certain parts.</p>
  
  <p>What I am trying to parse:</p>
  
  <pre><code>&lt;td class="alt1" id="td_post_139718"&gt; 
  &lt;!-- message, attachments, sig --&gt; 
          &lt;!-- icon and title --&gt; 
          &lt;div class="smallfont"&gt; 
              &lt;img class="inlineimg" src="images/icons/icon1.gif" alt="Default" border="0" /&gt; 
              &lt;strong&gt;Re: TERA's E3 2010 Coverage&lt;/strong&gt; 
          &lt;/div&gt; 
  </code></pre>
  
  <p>My Code:</p>
  
  <pre><code>$titleArray = array();
          foreach($idArray as $id) {
              $title = $dom-&gt;getElementById('td_post_'.$id);
              $smallFont = $title-&gt;getElementsByTagName("div");
              echo $smallFont-&gt;nodeValue;
          }
  </code></pre>
  
  <p>It yields:</p>
  
  <pre><code>Notice: Undefined property: DOMNodeList::$nodeValue in C:\wamp\www\crawler\crawler.php on line 71
  
  Notice: Undefined property: DOMNodeList::$nodeValue in C:\wamp\www\crawler\crawler.php on line 71
  
  Notice: Undefined property: DOMNodeList::$nodeValue in C:\wamp\www\crawler\crawler.php on line 71
  </code></pre>
  
  <p>I am trying to find the text within a  that is within a dynamic .</p>
  
  <p>I've tried all sorts of combinations to try and get it to work but I've been able to achieve it.</p>