Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Order of images in script


rainborick - 2:45 am on Jul 23, 2012 (gmt 0)


I don't see any problems with the code I posted, but without being able to see your entire page/script I can't tell what line #40 looks like to try to find the problem. It probably doesn't matter, though, because the only critical change required to sort the file list is to replace the line:

foreach ( new DirectoryIterator($directory) as $item ) {

in your original script with:

$slidefiles = new DirectoryIterator($directory);
asort($slidefiles);
foreach ($slidefiles as $item ) {


Thread source:: http://www.webmasterworld.com/php/4477824.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com