title: Use PHP Simple HTML DOM Parser to find table cell and get contents of next sibling
body: <p>I am trying to use PHP Simple HTML DOM Parser to grab the HTML of an external file. The file contains a table and the goal is to find a able cell with specific data contents, and then get the next sibling cell's data. This data needs to be places into a PHP variable. </p>
  
  <p>Based on the research and info found in articles like <a href="https://stackoverflow.com/questions/3577641/how-to-parse-and-process-html-xml-with-php">How to parse and process HTML/XML with PHP?</a>, <a href="https://stackoverflow.com/questions/3820666/grabbing-the-href-attribute-of-an-a-element/3820783#3820783">Grabbing the href attribute of an A element</a>, <a href="http://www.bitrepository.com/php-simple-html-dom-parser.html" rel="nofollow noreferrer">Scraping Data: PHP Simple HTML DOM Parser</a> and of course <a href="http://simplehtmldom.sourceforge.net/manual.htm" rel="nofollow noreferrer">PHP Simple HTML DOM Parser Manual</a> I've been able to produce some results, but I'm afraid I may be on the wrong track.</p>
  
  <p>The table row looks like this:</p>
  
  <pre><code>&lt;tr&gt;
  &lt;td&gt;fluff&lt;/td&gt;  
  &lt;td&gt;irrelevant&lt;/td&gt; 
  &lt;td&gt;etc&lt;/td&gt;   
  &lt;td&gt;&lt;a href="one"&gt;Hello world&lt;/a&gt;&lt;/td&gt;                        
  &lt;td&gt;123.456&lt;/td&gt; 
  &lt;td&gt;fluff&lt;/td&gt;          
  &lt;td&gt;irrelevant&lt;/td&gt;   
  &lt;td&gt;etc&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>What I'm trying to accomplish is to find the table cell that contains "Hello world", and then get the number from withing the next td cell. The following code finds that table cell and echoes its contents, but my attempts to use it as a landmark in order to get the next cell's data have failed...</p>
  
  <pre><code>$html = file_get_html("http://site.com/stuff.htm");
  $e = $html-&gt;find('td',0)-&gt;innertext = 'Hello world';
  echo $e;
  </code></pre>
  
  <p>So ultimately, in the example above the value of 123.456 needs to somehow get into a PHP variable.</p>
  
  <p>Thanks for your help!</p>