This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 24th, 2012  |  syntax: None  |  size: 0.69 KB  |  views: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $files = filelist("./",1,1); // call the function
  2. shuffle($files);
  3. foreach ($files as $list) {//print array
  4. echo "<a href="" . $list['name'] . "$startDir"><h4> " . $list['name'] . " </h4></a>";
  5. //    echo "Directory: " . $list['dir'] . " => Level: " . $list['level'] . " => Name: " . $list['name'] . " => Path: " . $list['path'] ."<br>";
  6.        
  7. $counter = 0;
  8. foreach ($files as $list) {//print array
  9.     // your loop code here...
  10.     $counter++;
  11.     if ($counter > 10) break;
  12. }
  13.        
  14. for($i=0; $i<=14; $i++) {
  15.    // echo $file[$i];
  16. }
  17.        
  18. foreach(array_slice($files, 0, 15) as $file) {
  19.   /* your code here */
  20. }
  21.        
  22. foreach (array_rand($files, 15) as $key) {
  23.   $file = $files[$key];
  24.   // Your code here
  25.  }
clone this paste RAW Paste Data