List files and directories inside the images directory in PHP
Description
The following code shows how to list files and directories inside the images directory.
Example
/* w w w . j av a 2s. co m*/
<?php
$dir = "/img/";
// Sort in ascending order - this is default
$a = scandir($dir);
// Sort in descending order
$b = scandir($dir,1);
print_r($a);
print_r($b);
?>