PDA

View Full Version : Dynamic Blending Image Slideshow Script?



student101
12-05-2009, 01:56 PM
Script: Blending Image Slideshow Script
http://www.dynamicdrive.com/dynamicindex14/image4.htm

How make it dynamic?

Attempted;

var slideimages=new Array("getpics.php")


//getpics.php...

function returnimages($dirname="path/to/images") {
$pattern="\.(jpg|jpeg|png|gif|bmp)$";
$files = array();
$i = 0;
if($handle = opendir($dirname)) {
while(false !== ($file = readdir($handle))){
if(eregi($pattern, $file)){
echo("'$dirname/$file',\n");
$i++;
}
}

closedir($handle);
}
return($files);
}
returnimages();

Any help here would be great!

Ok, cool fixed!

echo("$dirname/$file,");