Sponsor Advertisements help keep UGN Security Online.
Sponsor Advertisements help keep UGN Security Online.
Want to earn prizes for clicking online advertisements? Join Rewards1.com.
|
|
|
#18215 - 03/06/03 07:52 AM
How would i change the font color in this php script?
|
Member
Registered: 04/23/02
Posts: 212
Loc: Redwood
|
<?
$delim = "\n";
$quotefile = "quotes.txt";
// okay, let's get going.
$fp = fopen($quotefile, "r");
$contents = fread($fp, filesize($quotefile));
$quote_arr = explode($delim,$contents);
fclose($fp);
// initiate randomness
srand((double)microtime()*1000000);
// generate random quote index
$quote_index = (rand(1, sizeof($quote_arr)) - 1);
// get quote at $quote_index and return it
$herequote = $quote_arr[$quote_index];
echo $herequote;
?>
|
|
Top
|
|
|
|
Sponsor Advertisements help keep UGN Security Online.
Sponsor Advertisements help keep UGN Security Online.
|
|
#18221 - 03/06/03 09:06 PM
Re: How would i change the font color in this php script?
|
Member
Registered: 04/23/02
Posts: 212
Loc: Redwood
|
actually when i tried that before i got a parse error on that line. I gave up trying to do it INSIDE the php script so i just broke out of php and used html <center><b><i><font color="#ffffff">
<?
$delim = "\n";
$quotefile = "quotes.txt";
// okay, let's get going.
$fp = fopen($quotefile, "r");
$contents = fread($fp, filesize($quotefile));
$quote_arr = explode($delim,$contents);
fclose($fp);
// initiate randomness
srand((double)microtime()*1000000);
// generate random quote index
$quote_index = (rand(1, sizeof($quote_arr)) - 1);
// get quote at $quote_index and return it
$herequote = $quote_arr[$quote_index];
echo $herequote;
?>
</center></b></i></font>I was thinking WAY to hard on this one the other night. I shoulda realized it was something easy like that.
|
|
Top
|
|
|
|
|
Registered: 03/16/13
Posts: 5
|
|
2198 Members
46 Forums
24935 Topics
60105 Posts
Max Online: 1567 @ 04/25/10 10:20 AM
|
|
|
0 registered (),
298
Guests and
249
Spiders online. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|