12-16-2009, 01:42 AM
|
#2 (permalink)
|
|
The Wanderer
Join Date: Dec 2008
Location: Auckland, NZ
Posts: 24
Thanks: 0
|
It will correctly sort the data in the $files array. But you are not using the $files array to render your data as HTML so the rendered output is not sorted.
Do this instead:
PHP Code:
while (false !== ($filename = readdir($dh))) {
$files[] = $filename;
}
sort($files);
foreach($files as $filename) {
// now render the html here
}
|
|
|
|