Re: Random pictures - not twice

From: Date: Mon, 04 Dec 2006 15:15:02 +0000
Subject: Re: Random pictures - not twice
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-245482@lists.php.net to get a copy of this message
At 11:20 PM +0100 12/3/06, Gustav Wiberg wrote:
Hi there! I have created a script the generates random pictures...
-snip-
With this above script the same picture can be shown twice. Is there any smart way of avoiding this without having to rely on cookies/sessionids?
Random does mean it can happen more than once. I think what you want is more along a shuffle. Look into the array function "shuffle". Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#245482) next »