ecm:random
- 1 Minute to read
- Print
- DarkLight
ecm:random
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
The function ecm:random returns a random positive integer between two integers. The result can include the values used to define the upper and lower ranges. The value returned is an integer data type.
${ecm:random(3, 6)}
This returns an integer value from the range 3 to 6, for example, 5.
Structure
ecm:random(integer, integer)
Parameters
Parameter | Description |
---|---|
integer | Specifies the lower range of the result. |
integer | Specifies the upper range of the result. |
If either parameter is entered as a negative integer or the lower range value is greater than the upper range, the function returns a value of -1
Was this article helpful?