0
Use PHP to achieve distributing red envelopes, and when we enter the number and total amount, PHP will be randomly assigned to each of these two values based on the amount, to ensure that everyone can receive a red envelope, it is to ask the various amount of red envelope, all of the total amount should be equal to the total amount of red envelopes.
We first have to analyze the law.