Dan, using your suggestion, $filearray would be just an empty array?
Should be:
PHP Code:
if ((stripos($file, ".jpg", 1) !== false || stripos($file, ".gif", 1) !== false) && (stripos($file, "th_") == 0)) {
// not !=, but ==
// also swtiched to stripos() in case extensions are JPG and what not.
Also something to think about, if the file extension happens to be .JPEG, the above if statement would not catch it.
PHP Code:
if (preg_match("/\.(jpg|jpeg|gif?)$/i", $file) && !preg_match("/^th_/i", $file)) {
Bookmarks