467,171 Members | 1,187 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,171 developers. It's quick & easy.

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.

Feb 8 '08 #1
  • viewed: 1152
1 Reply
Expert 100+
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?

Feb 11 '08 #2

Post your reply

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

Similar topics

5 posts views Thread by Ross MacGregor | last post: by
5 posts views Thread by lallous | last post: by
7 posts views Thread by eric.gagnon@loto-quebec.com | last post: by
6 posts views Thread by Poul Møller Hansen | last post: by
6 posts views Thread by Leon | last post: by
2 posts views Thread by Simon Wittber | last post: by
14 posts views Thread by Steven D'Aprano | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.