title: Using multiple find in foreach with QueryPath
body: <p>I'm using QueryPath and PHP.</p>
  
  <p>This finds the .eventdate okay, but doesn't return anything for .dtstart:</p>
  
  <pre><code>$qp = htmlqp($url);
  foreach ($qp-&gt;find('table#schedule')-&gt;find('tr') as $tr){
      echo 'date: ';
      echo $tr-&gt;find('.eventdate')-&gt;text();
      echo ' time: ';
      echo $tr-&gt;find('.dtstart')-&gt;text();
      echo '&lt;br&gt;';
  }
  </code></pre>
  
  <p>If I swap the two, .dtstart works okay, but .eventdate doesn't return anything. Thus, it seems that find() in querypath destroys the element and only returns the value it needs, making iteration over $tr not possible to search for multiple items.</p>
  
  <p>Here's example HTML for a TR I'm dealing with:</p>
  
  <pre><code>&lt;tr class="event"&gt;&lt;th class="date first" scope="row"&gt;&lt;abbr class="eventdate" title="Thursday, February 01, 2011" &gt;02/01&lt;/abbr&gt;&lt;span class="eventtime" &gt;&lt;abbr class="dtstart" title="2012-02-01T19:00:00" &gt;7:00 PM&lt;/abbr&gt;&lt;abbr class="dtend" title="2012-02-01T21:00:00" &gt;9:00 PM&lt;/abbr&gt;&lt;/span&gt;&lt;/th&gt;&lt;td class="opponent summary"&gt;&lt;ul&gt;&lt;li class="first"&gt;@ &lt;a class="team" href="/high-schools/ridge-wolves/basketball-winter-11-12/schedule.htm" &gt;Ridge &lt;/a&gt; &lt;span class="game-note"&gt;*&lt;/span&gt;&lt;/li&gt;&lt;li class="location" title="Details: Ridge High School"&gt;Details: Ridge High School&lt;/li&gt;&lt;li class="last"&gt;&lt;a class="" href="/local/stats/pregame.aspx?contestid=4255-4c6c-906d&amp;amp;ssid=381d-49f5-9f6d" &gt;Preview Game&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;td class="result last"&gt;&lt;a class="pregame" href="/local/stats/pregame.aspx?contestid=4255-4c6c-906d&amp;amp;ssid=381d-49f5-9f6d"&gt;Preview&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p>I tried copying the $tr before the first find and replacing it before the second, but that didn't work.</p>
  
  <p>How can I search during each $tr for certain variables? </p>
  
  <p>FYI, beyond .eventdate and .dtstart, I also want the .opponent, href under the <code>a</code> for the opponent and the <code>a</code> anchor text.</p>