Forum Moderators: coopster
Here is what I have but it seems I have a bug somewhere:
<?
$pages = array(
include(page1.php),
include(page2.php),
include(page3.php)
);
shuffle($pages);
$i=0;
$number=2; while(list(, $page) = each($pages)) {
if ($i>=$number) { break; }
echo "$page";
echo '<br>';
$i++;
}
?>
For some reason the pages aren't coming up right in the default.php page.
Any help on this would be grealy appreciated.
sauce
You included the pages, so they are already processed - you don't echo include, as include doen't give output. Use the mykel's way instead - notice he includes only one file, not all three.
Hope this explained things a bit
Best regards
Michal Cibor