NYCPHP Meetup

NYPHP.org

[nycphp-talk] generate random unique 8-digit number

Christopher R. Merlo cmerlo at ncc.edu
Tue Mar 10 01:52:34 EDT 2009


On Mon, Mar 9, 2009 at 9:56 PM, chad qian <nynj.tech at hotmail.com> wrote:

>  Hi,
> I need to generate random 8-digit numbers continuously.And no
> duplication among all those numbers.In other word,every single 8-digit
> number must be unique.
>

It is not mathematically feasible to continuously generate unique random
numbers with any upper bound.  They will repeat at some point.  Why don't
you tell us more about the problem you're trying to solve, because there's
probably a much simpler solution.


> How to do php programming?
>

That question requires a much longer answer.
-c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20090310/a2930674/attachment.html>


More information about the talk mailing list