i created a php code that saves in an array to names on the photos from a directory,next i would like to create a javascript slideshow that uses the array,not to load photos manually.i have and upload function on other page so it would be perfect to slideshow dynamically.any ideas?p.s i'm new to html,php,javascript
found this: where "altele/" is directory name and "result" is the array created by the php,but it doesn`t work
var curimg=0
function rotateimages(){
document.getElementById("slideshow").setAttribute("src", "altele/"+result[curimg])
curimg=(curimg<result.length-1)? curimg+1 : 0
}

window.onload=function(){
setInterval(rotateimages(), 2500)
}