Page 1 of 1
Rotate Between HTML
Posted: Tue Dec 21, 2010 5:23 pm
by ccmovies
I am making a testimonial area and I want it to rotate between different quotes with the refresh of the page. How can I do this? I was thinking something to do with the PHP random code, but I am not very good with PHP so I wasn't sure. Thanks!
Re: Rotate Between HTML
Posted: Tue Dec 21, 2010 6:18 pm
by requinix
Random != rotating. If you want random then that's pretty easy, but if you want rotating then you need to keep track of the previous testimonial and show the next one in the list.
Re: Rotate Between HTML
Posted: Tue Dec 21, 2010 6:31 pm
by Jonah Bron
You'll have to be more specific on how you have it set up so far. Do you have your testimonials stored in a database already?
Re: Rotate Between HTML
Posted: Tue Dec 21, 2010 6:44 pm
by s.dot
Fill an array with testimonials, shuffle() it, and pick a key.