How to get a text randomly out of stored texts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Anuhas
    New Member
    • Jan 2008
    • 23

    How to get a text randomly out of stored texts

    Dear Experts,

    I need to get a text randomly out of stored texts.

    Ex. I need CX from ND, CX, MH, HG Like wise...........

    I am already aware of how to get random numbers. But dont know this.
    Please help me ASAP !

    Anuhas
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    #2
    You could split the stored text's to an array,
    generate a random number , with the maximum based on the length of that array

    and grab the string located in the array index produced my the random number generator.

    Comment

    Working...