I'm trying to create a random image script for a header in a CPG-Nuke based website. I've read through the numerous threads regarding pulling random images but they don't quite seem to fit the bill.
The situation I have is I have headers that contain 9 jpgs. Lets just say img1.jpg-img9.jpg
With 3 different headers I have directories
theme\images\headers\1\
theme\images\headers\2\
theme\images\headers\3\
What I'd like to do is generate a random number then inject that random number into all the image references of the header table. This way the randon number references the directory and all the images contained in there will match up.
My theory is this
Pick random number between 1 and 3 (number of directories)
random number chosen is X
<img src="themes/YOURTHEME/images/headers/"X"/image1.gif">