title: parsing using DOM Element
body: <p>Suppose I have some html and I want to parse something from it.
  In my html I know A, and want to know what is in C .
  I start getting all td elements, but what to do next ?</p>
  
  <p>I need to check something like " if this td has A as value then check what is written in third td after this. But how can I write it ?</p>
  
  <pre><code>$some_code = ('
  ....
  &lt;tr&gt;&lt;td&gt;A&lt;/td&gt;&lt;td&gt;...&lt;/td&gt;&lt;td&gt;c&lt;/td&gt;&lt;/tr&gt;
  .....
  ');
  $doc-&gt;loadHTML($some_code);
  $just_td = $doc-&gt;getElementsByTagName('td');
  
  foreach ($just_td as $t) {
  some code....
  }
  </code></pre>