Hi I need a way to change a page on every refresh This is the code I have <div id="body"> <?php include('1.php'); ?> <?php include('2.php'); ?> <?php include('3.php'); ?> <?php include('4.php'); ?> <?php include('5.php'); ?> </div> I need to either randomize or rotate the order of the php files on refresh, preferably rotate. so 1-2-3-4-5 refresh 2-3-4-5-1 and so on (or randomize) what's the best way to do it? Thanks
Well i'm no PHP expert but maybe you could use the rand function in some way? Maybe if you named the files in such a way.. blah1.html blah2.html blah3.html blah4.html and then used the rand function in such a way, then you could use an include like: blah "the random number" .html However i'm a complete noob and wouldn't know how to generate the random number. There's probably an easier way to go about this.