Posted by Franηoise Debat on 02/13/07 18:31
Hello everybody,
I have this problem reading the contents of a directory. here is my code:
$my_dir = dir('data/templates');
asort($my_dir);
while (false !== ($entry = $my_dir->read()))
{
echo $entry."<br>\n";
}
$my_dir->close();
But I need it to read the directory in alphabetical order and I cannot
succeed in this. "asort" is not doing what it is supposed to do. Can
somebody tell me how to achieve this?
Thank you
Françoise
Navigation:
[Reply to this message]
|