For my banner/slider I change the content with a if elseif statement to load specific images and links.
The amount of slider images are variable.
I use 3 links separate from the images and 1 background image.
This is my code now: (2 time change examples)
if($epochTime > 1427641200) { // zo 29 maart
// slider images
img1
img2
img3
img4
img5
img6
// seperate links
link1
link2
link3
// background image
imgA
} elseif($epochTime > 1427040000) { // zo 22 maart
// slider images
img3
img4
img7
img8
// seperate links
link2
link4
link5
// background image
imgB
}
Well, when I want to code several weeks forwards with different images, links and background, I have to copy/paste a lot of the same code again and again and adjust the images, links and background for the ones that week.
I like to simplefy this and thought about a (week) array containing the necessary data and parse them with some foreach code.
And here it stops for me :-(, I don't know how to set it up. Please help or advise. Thanks.