title: PHP : Ganon dom parser filter the anchor tags
body: <p>I am working with PHP Dom Parser library and i have a complex HTML structure to parse : </p>
  
  <pre><code>&lt;table width="640" style="color: #333333;"&gt;
  &lt;tbody&gt;&lt;tr&gt;
  &lt;td valign="top"&gt;
  &lt;font face="Arial,Helevetica,sans-serif"&gt;
  &lt;a href="http://forums.timezone.com/index.php?t=tree&amp;amp;goto=6577581&amp;amp;rid=0"&gt;20mm Omega SMP Bond Bracelet Ref. 1503-825- PRICE DROP&lt;/a&gt;&lt;br&gt;
  &lt;font size="-1" color="#999999"&gt;Sales Corner - &lt;a href="http://forums.timezone.com/index.php?t=usrinfo&amp;amp;id=462&amp;amp;rid=0"&gt;The Bigwatch Guy&lt;/a&gt;&lt;/font&gt;&lt;font size="-1" color="#999999"&gt; - Aug 7, 2013&lt;/font&gt;&lt;br&gt;
  &lt;font size="-1"&gt;20mm OMEGA SEAMASTER PROFESSIONAL "BOND" BRACELET REF. 1503-825. All s/s genuine Bond bracelet in excellent condition. The bracelet is 6.6 inches long...&lt;/font&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td valign="top"&gt;
  &lt;font face="Arial,Helevetica,sans-serif"&gt;
  &lt;a href="http://forums.timezone.com/index.php?t=tree&amp;amp;goto=6577577&amp;amp;rid=0"&gt;Longines Lindbergh Hour Angle Chronograph- PRICE DROP&lt;/a&gt;&lt;br&gt;
  &lt;font size="-1" color="#999999"&gt;Sales Corner - &lt;a href="http://forums.timezone.com/index.php?t=usrinfo&amp;amp;id=462&amp;amp;rid=0"&gt;The Bigwatch Guy&lt;/a&gt;&lt;/font&gt;&lt;font size="-1" color="#999999"&gt; - Aug 7, 2013&lt;/font&gt;&lt;br&gt;
  &lt;font size="-1"&gt;42mm (not counting the crown) LONGINES LINDBERGH HOUR ANGLE AUTOMATIC CHRONOGRAPH W/ COMPLETE BOXSET AND PAPERS - NEARMINT PLUS CONDITION. The strap h...&lt;/font&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I am trying to get all the anchor tags whose href attribute contains <code>goto</code> string 
  , I have tried with below code : </p>
  
  <pre><code>&lt;?php 
  include("ganon.php");
  $html = file_get_dom('http://forums.timezone.com/search/?q=Public+Forum&amp;f=4&amp;s=0');
  $c=1;
  if( count($html("table[width='640']"))&gt;0 ){
      foreach($html("a[href=*goto]") as $elm){
              echo $c.')'.$elm-&gt;href.'&lt;br/&gt;';
      $c++;
      }
  }
  ?&gt;
  </code></pre>
  
  <p>The above code is throwing this notice : <code>Notice: Expected identifier at 7! in D:\xampp\htdocs\govberg\ganon.php on line 2196</code> with no other output.</p>