Re: Random Images

From: Date: Thu, 06 Feb 2003 06:04:25 +0000
Subject: Re: Random Images
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134556@lists.php.net to get a copy of this message
Tom! Here's one way: I named all of the images to display 1.jpg - 7.jpg This code is at the top of the page: <?$jpg = rand(1,7);?> I have this code where I want the image to appear: <img src="img/<?print $jpg;?>.jpg" width=632 height=422> HTH VW Quoting Tom Ray <tom@blazestudios.com>: ### I'm trying to set it up so that a random image from either a mysql table ### or a text file list is displayed on a page each time a user goes to it. ### I'm a little stumped as to how to do this with php....any suggestions? ### ### ### -- ### PHP General Mailing List (http://www.php.net/) ### To unsubscribe, visit: http://www.php.net/unsub.php ### ### -- Richard Whitney Transcend Development Producing the next phase of your internet presence. rw@xend.net http://xend.net 602-971-2791

« previous php.general (#134556) next »