How to Generate 14 Digit Unique Random Number Using PHP? When discussing single numbers, a random number is one that is drawn from a set of possible values, each of which is equally probable. For example, a good (unloaded) die has the probability 1/6 of rolling a one, 1/6 of rolling a two a… Generate random integers (maximum 10,000). You get the number of four digits Your value will change as often as you refresh this browser. Generate a random, unique, alpha-numeric string using PHP. ... To generate a 4 digit PIN with duplicate digits, choose Sample Size: 4, Sample Range: 0-9, and Allow Duplicates: yes. To generate a 4 digit PIN without duplicate digits, choose Min = 0, Max = 9 and Generate 4 Numbers. The rand() PHP function can also be used to generate a random number within a specific range, such as a number between 10 and 30. Before we try, let's define what exactly we mean by a random number. To simulate a dice roll, the range should be 1 to 6 for a standard six-sided dice.T… 3. Generate numbers sorted in ascending order or unsorted. The float data type can commonly store a value up to 1.7976931348623E+308 (platform dependent), and have a maximum precision of 14 digits. The syntax goes like this: RAND([N]) Although the distribution of the numbers returned by random() is essentially random, the sequence is predictable. fourdigitrandom.html