Forum Statistics

  • Forum Members: 4,502
  • Total Threads: 3,657
  • Total Posts: 1
There are 1 users currently browsing forums.

Partner Sites

Reply
Old 05-04-2010, 01:39 AM   #1 (permalink)
ststacytucker9
 
Status: Guest
Posts: n/a



Default Trying to include randomly-selected HTML blocks via php

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

The page is online at theperfectseason-dot-com-slash-giving-dyn.php in case my hero-helper wants to look at the entire source.
  Edit/Delete Message Reply With Quote


Reply

Bookmarks

Tags
None


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may post new threads
You may post replies
You may post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.5.0 RC2