rand( [min_val, max_val] )
Name | Type | Description | Required |
---|---|---|---|
min_val | integer | Lower limit (inclusive). | No. |
max_val | integer | Upper limit (inclusive). | No. |
This operator returns a random integer. The optional parameters "min_val" and "max_val" can be used to control the range from which the random number is picked. If you want a random integer between 3 and 13 (inclusive), use (3, 13) as parameters.
rand()
Returns a random integer.
rand( 5 )
Returns a random integer that is greater than 4.
rand( 3, 13 )
Returns a random integer that is greater than 2 and less than 14.
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.