The goal here is to have a new group of featured products change when either a page is refreshed or a visitor returns to the site. What I have done is created six product galleries and then placed them in a random call as follows:
When I call the php files individually they work fine, but when I call from the "galleryrotator.php" file I simply get a ( ; ?>) where the file should appear.Code:<?php srand((float) microtime() * 10000000); $input = array( '<?php include ("gallery-insert.php">; ?>', '<?php include ("gallery-insert2.php">; ?>', '<?php include ("gallery-insert3.php">; ?>', '< php include ("gallery-insert4.php">; ?>', '<?php include ("gallery-insert5.php">; ?>', '<?php include ("gallery-insert6.php">; ?>', ); $rand_key = array_rand($input); echo $input[$rand_key] . "\n"; ?>
Is it not possible to achieve this with php or is there something I am missing in the code which is clearly possible since I am just beginning to understand php a wee bit better.
Thanks for your help.
DM



Reply With Quote


Bookmarks