Re: random quote script with flat file? (PHP Vault: Random Quote Script)

From: Date: Sun, 19 May 2002 01:17:36 +0000
Subject: Re: random quote script with flat file? (PHP Vault: Random Quote Script)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-98311@lists.php.net to get a copy of this message
> list($usec,$sec)=explode(" ",microtime()); > mt_srand($sec * $usec); > $quotes = file("quotes"); > echo $quotes[mt_rand(0, (sizeof($quotes)-1))]; Yes!!! That works exactly! I love PHP! I love this list.... and look forward to the day when I can contribute something more than fascinating questions ;-) Thank you! TjL

« previous php.general (#98311) next »