View Single Post
  #2  
Old 10-26-2011, 05:31 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
If your array is guaranteed to have more than 1 element:

echo(randomstring(this.array));

will do exactly what you want to. You can also do:

temp.result = this.array[int(random(0, this.array.size()))];
__________________
Quote:
Reply With Quote