php.net/substr
php.net/ereg
php.net/preg_match
foreach ( $files as $filename )
if ( substr($filename, -4) == '.jpg' )
array_push($jpegs, $filename);
Keep in mind, though, that not all JPEG files end with jpg. There is also jpe
and jpeg, and you have to consider case sensi
my problem:
I've got a list of files in a directory, and I'd like to get a only of
filenames that end in ".jpg", however, exlude the files that end in
".thumb.jpg"
ex:
file.php
index.htm
photo.jpg
photo.thumb.jpg
etc
how can I count only those files that end with ".jpg" ?
Any help appreciate
2 matches
Mail list logo