How to remove all images from an array with a specific filename
<p>I am using the code below to create an array of images. I'd love to be able to <strong>not</strong> add any images with <code>-c.jpg</code> in the filename. How can I do this?</p>

<pre><code>&lt;?php
$jsarray = array();
$iterator = new DirectoryIterator(dirname("public/images/portfolio/all/"));
foreach ($iterator as $fileinfo) {
    if ($fileinfo-&gt;isFile()) {
        //filtering to exclude the color images
        $jsarray[] = "'" . $fileinfo-&gt;getFilename() . "'";
    }
}
$jsstring = implode(",", $jsarray);
?&gt;
</code></pre>

<p>I'm using PHP5.</p>
