Last week I went hunting for a little script that would rotate an image and a caption with every screen refresh. Should be a simple task, no?
I looked for PHP scripts – I didn’t find as many, but I think I really lucked out when I discovered this tiny little PHP rotation script from Sue Crocker.
I love this. You just put it where you want to show the images and bang, it runs. No problems, no confusion. You put the images and accompanying captions into a text file separated by NEXT statements like this one. Within this text file, you can assign a CSS class to the captions so that they’ll show up in an absolutely positioned space and not directly under the image, as you can see in this page in progress. It’s the Featured Flower at the bottom that’s running the script – refresh the page to see it in action.
And it works beautifully. This is one of the most elegant and simple solutions I’ve found in a while.