I have a jquery function which relies on an array of images to create a fadeOut/In effect.
The line of code looks like this:
var images=new Array('/images/myImage1.jpg','/images/myImage2.jpg','/images/myImage3.jpg');
Currently I manually create this array but I would like to create it using php to grab the images in a directory on my server. I have found the following code which does this but I need to format so it looks like the javascript above.
<?php
$dir = 'chamberImages/portfolio';
$files2 = scandir($dir, 1);
print_r($files2);
?>