Re: Random pictures - not twice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----- Original Message ----- From: "tedd" <tedd@xxxxxxxxxxxx> To: "Gustav Wiberg" <info@xxxxxxxxxxx>; "PHP General" <php-general@xxxxxxxxxxxxx>
Sent: Monday, December 04, 2006 4:15 PM
Subject: Re:  Random pictures - not twice


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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Hi there!

Ok, thanx! I will check the function out :-)

Best regards
Gsutav Wiberg
http://www.stammis.com/ - Stammis Internet - pedigrees on the net

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux