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($handl e);
}
?>
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($handl e);
}
?>
Comment