RE: [PHP] Random include???
| From: | (Edward Peloke) | Date: | Thu, 19 Dec 2002 15:21:15 +0000 |
| Subject: | RE: [PHP] Random include??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-128866@lists.php.net to get a copy of this message | ||
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:mailing@cyclonemedias.com]
Sent: Thursday, December 19, 2002 9:46 AM
To: php-general@lists.php.net
Subject: [PHP] Random include???
Hi, I'm a newbie in php so sorry for that question!
I have a table in a html dcc and I want to include 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 the random.
Ex. My file are
folio_1.php3
folio_2.php3
folio_3.php3
folio_4.php3
folio_5.php3
<TD WIDTH=77 HEIGHT=435 ROWSPAN=2 align="left"><?
include("folio.php3");
?></TD>
Thanks!
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php