hi...habe folgendes script...ist eine bilder routation....bloß möchte ich hinkriegen, dass er nur bilder anzeigen soll die mit fotouser_ anfangen....hoffe hier kann mir jemand helfen
	
							
						
					PHP-Code:
	
	
<?php
  
  //Verzeichnis (bei ./ ist das derzeit benutze)
  $path = "images/avatar/";
  
  //Verzeichnis oeffnen
  $dir = @opendir($path);
  
  //Array fuer die Bilder setzen
  $picture = array();
  
  //Verzeichnis auslesen
  while($file = readdir($dir)){
    if(filetype($path.$file) != "dir"){
      $picture[] = $path.$file;
    }
  }
  
  //Die Werte innerhalb des Arrays zaehlen
  $count = count($picture);
  
  //1 von $count abziehen
  $count -= 1;
  
  //Zufallsgenerator initialisieren
  srand((double) microtime() * 1000000);
  
  //Zufallsbild raussuchen
  $int = rand(0, $count);
  
  //img-tag fuer Zufallsbild
  $boxlinks[]= "<img src=\"".$picture[$int]."\">";
?>
          
Kommentar