HTML DOM and strpos
<p>I am using simple html dom parser</p>

<pre><code>foreach($html-&gt;find('a') as $element) {
    //produce results
    if(strpos($element, 'string')) {
       $myarray[] = $element-&gt;href;
    }
}
</code></pre>

<p>vs</p>

<pre><code>foreach($html-&gt;find('a') as $element) {
    //not producing result
    if(strpos($element-&gt;href, 'string')) {
       $myarray[] = $element-&gt;href;
    }
}
</code></pre>

<p>Why when i add strpos function to element->href, it never detect the word string even tho the href has string keyword.</p>
