I have slideshow for images built with javascript.
The images are in a db and being stored as a blob type. I have the right scripts to display the images. Now i would like to use this javascript to make a slideshow out of the images. The problem is that I would like to change the id of image but I guess itīs not possible to just code the php within the javascript. Can anyone help please?

This what i have right now:
Code JavaScript:
var mySlideList1 = 
['/php/img.php?id=1&ref=1', '/php/img.php?id=2&ref=1', '/php/img.php?id=3&ref=1', '/php/img.php?id=4&ref=1', '/php/img.php?id=5&ref=1'];