I'm working on a simple php/html page that wants to include an external html file selected at random on load, from a group of 3. And I need help! The code I have is:
Code:
<?php
$randContent = array_rand('gift1.html', 'gift2.html', 'gift3.html');
include($randContent);
?>
It's not working. I have gift1.html, etc. stored in the same folder. On execute, this is the error message I get, pertaining to the code above:
Warning: Wrong parameter count for array_rand() in /home/content/p/e/r/perfectseason/html/giving-dyn.php on line 258
Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/p/e/r/perfectseason/html/giving-dyn.php on line 259