View Single Post
  #3  
Old 10-26-2011, 06:36 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by fowlplay4 View Post
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()))];
Thank you very much
__________________
Reply With Quote