Why isn't this simple PHP expression working?
<pre><code>    $links = array('https://google.com', 'http://aloe.com', 'http://foobar.org/image.jpg');

    foreach ($links as $link)
    {
            $unacceptables = array('https:','.doc','.pdf', '.jpg', '.jpeg', '.gif', '.bmp', '.png');
            foreach ($unacceptables as $unacceptable)
            {
                if (strpos($link, $unacceptable) !== false)
                {
                        echo 'not acceptable!&lt;br /&gt;';
                }
                else
                {
                        echo 'acceptable&lt;br /&gt;';
                }
            }
    }
</code></pre>

<p>The above should output:</p>

<pre><code>not acceptable
acceptable
not acceptable
</code></pre>

<p>But instead if outputs this mess:</p>

<pre><code>not acceptable!
acceptable
acceptable
acceptable
acceptable
acceptable
acceptable
acceptable
acceptable
acceptable
acceptable
acceptable
acceptable
acceptable
acceptable
acceptable
acceptable
acceptable
acceptable
not acceptable!
acceptable
acceptable
acceptable
acceptable
</code></pre>

<p>How to get it to work right?</p>
