View Single Post
  #9  
Old 10-26-2011, 10:52 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
int(value) - Converts the value to an integer (rounded). I.e: int(2.5) - returns 2
random(a, b) - Returns a random value between a and b. It'll never equal b though.
array[i] - The element in the array.

It basically generates a valid random index in the array.

PHP Code:
temp.ind int(random(0this.array.size()));
temp.result this.array[temp.ind]; 
__________________
Quote:
Reply With Quote