Status Board Slide Show

read())) { $ext = substr($file, strrpos($file, '.')); if ($ext == ".jpg" || $ext == ".jpeg") // allowed extensions { $imgs[$file] = $file; } } $d->close(); shuffle($imgs); // shuffle images // asort($imgs); // sort images - uncomment this line to override shuffle return $imgs; } $array = randPics('/home/www/mywebsite.com/path/to/images/'); // absolute path to image folder $url = 'http://www.mywebsite.com/path/to/images/'; // URL of image folder $first = reset($array); echo "

    n"; foreach ($array as $key => $img) { if ($first == $img) { echo "
  • n"; } else { echo "
  • n"; } } echo "
n"; ?>

Back