Hi, I'm a newbie in php so sorry for that question!
I have a table in a html dcc and I want toinclude a file in a cell, but
that file must be random so people load a different page each time they
refresh... The basic syntax I use for the include is below now, I want to
know how to generate
Won't this work?
$random=rand(1,5);
print TD WIDTH=77 HEIGHT=435 ROWSPAN=2 align='left';
include(folio_$random.php);
-Original Message-
From: Benjamin Trépanier [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 9:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Random
Hi,
untested code adapted from a random image thing I have... this works by
checking the files in a directory and picking one at random.
?
function getRandomFile($start_dir)
{
chdir($start_dir);
$dir = opendir('.');
while (($myfile = readdir($dir)) !==false)
{
if
3 matches
Mail list logo