UK [rænd] US [rænd]

n. The padding between the heel of the shoe and the sole, edge

Plural: rands rand

php mt_rand() function syntax

How to use the mt_rand() function?

php The mt_rand() function means to get a random number from the parameter range. The syntax is mt_rand(X,Y). It gets a random number from the two parameter ranges. The random number is greater than or equal to X or Less than or equal to Y

Function:Get a random number from the parameter range

Syntax:mt_rand(X,Y)

Parameters:

Parameters Description
X Represents the minimum number in the range
Y Represents the maximum number in the range

Instructions:Get a random number from the range of two parameters, the random number is greater than or equal to X or less than or equal to Y

php mt_rand() function example


Run instance»

Click the "Run instance" button to view the online instance

Output:

取得的随机数为5

Run Instance»

Click the "Run Instance" button to view the online instance

Output:

取得的随机数为24