title: PHP: Simple HTML DOM Parser - how to get the element which has certain content?
body: <p>In PHP I'm using the Simple HTML DOM Parser class.</p>
  
  <p>I have a HTML file which has multiple A-tags.</p>
  
  <p>Now I need to find the tag that has a certain text inside.</p>
  
  <p>for example :</p>
  
  <pre><code>$html = "&lt;a id='tag1'&gt;A&lt;/a&gt;
           &lt;a id='tag2'&gt;B&lt;/a&gt;
           &lt;a id='tag3'&gt;C&lt;/a&gt;
          ";
  
  $dom = str_get_html($html);
  $tag = $dom-&gt;find("a[plaintext=B]");
  </code></pre>
  
  <p>The above example doesn't work, since plaintext can only be used as an attribute.</p>
  
  <p>Any idea's?</p>