I am using the code below to create an array of images. Id love to be able to NOT add any images with -c.jpg in the filename. Can anyone help get this up and running? I am using PHP 5
<?php
$jsarray = array();
$iterator = new DirectoryIterator(dirname("public/images/portfolio/all/"));
foreach ($iterator as $fileinfo) {
if ($fileinfo->isFile()) {
//filtering to exclude the color images
$jsarray[] = "'" . $fileinfo->getFilename() . "'";
}
}
$jsstring = implode(",", $jsarray);
?>