How to select all elements except specific one?
<p>I have a structure like this:</p>

<pre><code>&lt;div&gt;
    &lt;span&gt;
        &lt;a class="test"&gt;one&lt;/a&gt;
    &lt;/span&gt;
    &lt;a&gt;two&lt;/a&gt;
    &lt;a&gt;three&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>And here is my code:</p>

<pre><code>$data = $html-&gt;find('div', 0);
foreach($data-&gt;find('a') as $article){
  echo $word .= $article-&gt;plaintext."&lt;br&gt;";
}
</code></pre>

<p>And here is current result:</p>

<pre><code>one
two
three
</code></pre>

<p>And here is expected result:</p>

<pre><code>two
three
</code></pre>

<hr>

<p>As you see in the above result, I want to select all <code>&lt;a&gt;</code> element except the one that has <code>test</code> classname. How can I do that?</p>

<p><strong>Note:</strong> I use <a href="http://simplehtmldom.sourceforge.net/manual.htm" rel="nofollow">this</a> PHP library.</p>