View Single Post
Old 10-17-2011, 05:13 PM  
georgeyw
58008 53773
 
georgeyw's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: Australia
Posts: 9,864
Quote:
Originally Posted by TheSquealer View Post
Is there an easy way to rotate php includes on a page?

For example, say you have an image gallery with a pic, title, description all in css... can you put everything in that css div in a php file (or 10 of them in 10 .php files), use an include and then use something to rotate those php includes.. and so duplicates aren't shown?
Are you wanting to control which gallery is displayed or simply random?

yourdomain.com/gallery.php?id=<Gallery ID here ie 3>

use a

$id = $_GET to grab the id

then include 'file'.$id.php

Better way would be to create a db and call gallerys by their id in the db.
georgeyw is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote