View Single Post
Old 10-07-2003, 07:38 AM  
grannytgp
Confirmed User
 
Join Date: Aug 2002
Posts: 269
php code for rotating index pages?

Can anybody help out with some simple PHP code to rotate three or more different index pages?

Basically, what I'm looking to do is test out some new page designs on a site. Right now I have the following code working just fine for two pages:

PHP Code:
<?php
if (mt_rand(1,2hahahaha 1) { include("index1.html"); }
else { include(
"index2.html"); }
?>
Simple enough... it rotates between the index1.html and index2.html pages in the same directory. But I'm looking to test at least 3 pages now, and was thinking it would be nice to possibly be able to set a weighted percentage on any of these pages.
grannytgp is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote