85 of 110 menu

PHP Random Number

To generate random numbers in PHP, the function mt_rand is used.

Let's use it to output a random number from 1 to 100 as an example:

<?php echo mt_rand(1, 100); ?>
English
БеларускаяEspañolРусский
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline