Re: RANDOM

From: Date: Wed, 08 Aug 2001 20:23:58 +0000
Subject: Re: RANDOM
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61905@lists.php.net to get a copy of this message
On Wed, 8 Aug 2001, Kyle Smith wrote: > Could somebody please show me, send me an example or redirect me to a page which shows how to > show a random FLASH movie from a text file which contains different names of different movies so > that when i go on the page it shows lets say, 1 of the 5 movies in the text document. > > Finally and almost hard question (probably not for you but for me.... AGGH) Something like this oughta do: <? mt_srand ((double) microtime() * 1000000); $randval = mt_rand(1,5); ?> <param name="movie" value="movie.<?=$randval?>.swf"> -- ----------------------------------------------------------------------- destiney - (des-ti-ny) - n. 1. deity of all things "html", 2. common internet addict, 3. lover of late 80's heavy metal music, 4. Activist for the terminally un-elite; see also - cool guy, des, mr. php... It's 4:00am, your web site is still up, why are you? http://phplinks.org/ http://phptopsites.com/ http://destiney.com/ -----------------------------------------------------------------------

« previous php.general (#61905) next »