Posted by Davide on 11/20/13 11:29
Hi all.
With this simple script I can see all my jpg in a web page..
but they are confused randomly in the page.
is there a way to put them alfabetically? from A to Z?
thanx
<?php
if ($handle = opendir('/cover')) {
while (false !== ($file = readdir($handle))) {
if (($file != "." && $file != "..")) {
echo " <img src=\"cover/$file\" alt=\"$file\" border=0> ";
}
}
closedir($handle);
}
?>
Navigation:
[Reply to this message]
|