note 15060 deleted from function.rand.php by philip

From: Date: Sun, 26 Aug 2001 11:29:24 +0000
Subject: note 15060 deleted from function.rand.php by philip
Groups: php.notes 
Request: Send a blank email to php-notes+get-17168@lists.php.net to get a copy of this message
A simple random image grabber, using srand() and rand() functions. <? $img = array("linux.gif","sun.gif","debian.gif"); srand ((float) microtime() * 1000000); $randval = rand(0,2); print"<img src=$img[$randval]>"; ?> Substitue the images in the array, and change the values in the rand() funtion - you will be all set! Works better with more images!

« previous php.notes (#17168) next »