Thread: Choose random
View Single Post
05-25-2006, 09:25 PM
#2
Jonny is offline Jonny
Status: Member
Join date: Feb 2005
Location: UK
Expertise:
Software:
 
Posts: 335
iTrader: 0 / 0%
 

Jonny is on a distinguished road

  Old

PHP Code:
$arraycount count($array);

for(
$i 0$i 3$i++) // note the 3 here
{
     
$random rand(0$arraycount);
     
$array[$random] = "New Content :O!";

Probably can be done lots better though. (by smarter people) It also wouldn't stop the content from being changed twice. :P