Home >Software Tutorial >Computer Software >How to set variables to random numbers in the source code editor_How to set variables to random numbers in the source code editor
Sometimes when we use PHP code to create variables, we need to set a random number, so how to achieve the following functions? This article is brought to you by PHP editor Xinyi. Please see the following introduction for detailed methods.
1. Open the source code editor, create a new variable, and name it [Random Box].
2. Find the building block that sets the variable value from the data box. The default value is 0.
3. Find the random number building block from the operation box and place it at the previous 0 position, and set the range of the random number.
The above is the detailed content of How to set variables to random numbers in the source code editor_How to set variables to random numbers in the source code editor. For more information, please follow other related articles on the PHP Chinese website!