generating a string of unique random numbers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rlm51
    New Member
    • Mar 2007
    • 29

    generating a string of unique random numbers

    Hey everyone ... happy Friday ...

    I need to generate a string of 11 random numbers, (which in itself is not a problem) however, each needs to be unique in value. Building a tree of logical compares is all well and good, but is there an easier way? I did this years ago in Pascal, and I remember the logic, but not the mechanics.

    Is there a shortcut in PHP?

    I would appreciate any suggestions.

    Be well everyone.

    Robert
  • MarkoKlacar
    Recognized Expert Contributor
    • Aug 2007
    • 296

    #2
    Hi Robert,

    I don't know how good your php skills are but you can work with the same logic(for the tree) in php. What you need is an array and your functions for balancing, sorting etc.

    Helps if the functions are recursive (to be clear, they most certainly have to be...).

    Is the point of you script to create a tree in the way that I described or are you looking for a finished solution ready for use?

    Cheers

    Comment

    Working...