Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Sortowanie funkcji dir()
--Jakub--
post
Post #1





Goście







mam skrypt który otwiera katalog i wylistowuje wszystkie pliki. niestety sa one pomieszane:

filename: 10.jpg
filename: 29.jpg
filename: 16.jpg
filename: 28.jpg
filename: 33.jpg
filename: 14.jpg
filename: 37.jpg
filename: 30.jpg
filename: delfin9.jpg
filename: delfin7.jpg
filename: 20.jpg
filename: 17.jpg

potrzebuje aby ten skrypt:

  1. <?php
  2.  
  3. $dir = dir("images/");
  4. while (($file = $dir->read()) !== false)
  5. {
  6. echo "filename: " . $file . "<br />";
  7. }$dir->close();
  8.  
  9. ?>


sortował wyniki alfabetyznie.

pozdrawiam, Jakub
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 17:11