Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> sortowanie alfabetyczne
alchemic
post
Post #1





Grupa: Zarejestrowani
Postów: 63
Pomógł: 0
Dołączył: 8.01.2004
Skąd: Legnionowo

Ostrzeżenie: (0%)
-----


Witam

mam taki skrypt:

  1. <style type="text/css">
  2. <!--
  3. .style1 {
  4. font-size: 10px;
  5. font-family: Verdana, Arial, Helvetica, sans-serif;
  6. }
  7. -->
  8. </style>
  9. <br /><br />
  10. <? 
  11. $kto= "galeria"; 
  12. if ($handle = opendir($kto)) 
  13. { 
  14.  while (false !== ($file = readdir($handle))) 
  15.  { 
  16. if ($file != "." && $file != "..") 
  17. { 
  18. if($handle2 = opendir($kto.'/'.$file)) 
  19. {
  20.  while (false !== ($file = readdir($handle))) 
  21.  { 
  22. if ($file != "." && $file != "..") 
  23. { 
  24.  $f = fopen($kto.'/'.$file.'/nazwa.txt', 'r'); 
  25.  $tekst = fread($f, 255); 
  26.  echo "<table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="#6284b7">"; 
  27.  echo" <tr> <td width=10%" align="center" bgcolor="#6284b7"><img src="grafika/p.gif" width="5" height="5" /></td>";
  28.  echo"<td width="90%" bgcolor="#6284b7"><span class="tekst"> <a href="index.php?strona=gal&kat=galeria/$file"><p align="left"><font face="Verdana" color="white" size="1">$tekst</a></span></td></tr></table>";
  29.  fclose($f); 
  30.  } 
  31.  } 
  32.  closedir($handle); 
  33. ?>


ale ma jeden blad wyswietla mi katalogi od 2 tz jak mam jeden w glaeri to nic nie wyswietla jak sa 2 to jeden tak...

a drugie pytanie to jak wyswietlic liste tych katalogow tak by nazwy $tekst byly wyswietlone alfabetycznie ?
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: 29.09.2025 - 02:48