
10-26-2011, 10:54 PM
|
|
Delterian Hybrid
|
 |
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
|
|
Quote:
Originally Posted by fowlplay4
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(0, this.array.size()));
temp.result = this.array[temp.ind];
|
Ah ok. Thank you  |
|
|
|