By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,830 Members | 2,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,830 IT Pros & Developers. It's quick & easy.

generating a string of unique random numbers

P: 29
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
Feb 8 '08 #1
Share this Question
Share on Google+
1 Reply


MarkoKlacar
Expert 100+
P: 296
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
Feb 11 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.