gvilla23
asked on
count number of .jpg's in a directory, sort in array to create links
I need to count number of images (.jpg) in a folder, sort them by name so I can dynamically create next and previous buttons in a gallery carousel.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
just noticed, that should be
$piccount++;
not
$piclist++;
thanks.
$piccount++;
not
$piclist++;
thanks.
You can traverse the folder to get the document names and types, separate only the jpg files into an array then do whatever else you want to do.