Home  >  Article  >  Software Tutorial  >  How to set variables to random numbers in the source code editor_How to set variables to random numbers in the source code editor

How to set variables to random numbers in the source code editor_How to set variables to random numbers in the source code editor

王林
王林forward
2024-04-29 17:43:05755browse

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].

How to set variables to random numbers in the source code editor_How to set variables to random numbers in the source code editor

2. Find the building block that sets the variable value from the data box. The default value is 0.

How to set variables to random numbers in the source code editor_How to set variables to random numbers in the source code editor

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.

How to set variables to random numbers in the source code editor_How to set variables to random numbers in the source code editor

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!

Statement:
This article is reproduced at:zol.com.cn. If there is any infringement, please contact admin@php.cn delete