[php] loading images in back order (from Z to A)
Posted: Mon May 04, 2009 7:04 am
This code loading all images from folder 'test' but in name order - 'form A to Z'. I want to load images invertly - 'from Z to A'. Do You have any ideas?
Code: Select all
<?php
if ($handle = opendir('test'))
{
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != ".." && $file != "index.html")
{
echo "<img src=test/$file></a>";
}
}
closedir($handle);
}
?>