rand() question
From: daniel kaplan (nospam_at_nospam.com)
Date: 09/15/04
- Next message: Marc Dashevsky: "Re: rand() question"
- Previous message: Sherm Pendley: "Re: die question"
- Next in thread: Marc Dashevsky: "Re: rand() question"
- Reply: Marc Dashevsky: "Re: rand() question"
- Reply: Joe Smith: "Re: rand() question"
- Reply: Ian Sedwell: "Re: rand() question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 14 Sep 2004 20:58:25 -0400
so i generate a serial number with the exact code below (three lines):
$number1 = 10000 + int(rand(99999));
$number2 = 10000 + int(rand(99999));
$shrwsn = "$number1-$number2";
the point is i want TWO five digit numbers separated by a dash "-"
and all is cool, but i just noticed, that for the three entries i have made
test wise:
79109-72626
106421-1023 these last two are six and four digits.....
108629-3542
WHY? these were all made with the SAME script...............
- Next message: Marc Dashevsky: "Re: rand() question"
- Previous message: Sherm Pendley: "Re: die question"
- Next in thread: Marc Dashevsky: "Re: rand() question"
- Reply: Marc Dashevsky: "Re: rand() question"
- Reply: Joe Smith: "Re: rand() question"
- Reply: Ian Sedwell: "Re: rand() question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|