The PHP mb_rand
function is used to generate a random number within a specified range. It is a multibyte-safe version of the rand
function.
Here is an example usage of mb_rand
:
$randomNumber = mb_rand(1, 10);
echo $randomNumber;
In this example, mb_rand
will generate a random number between 1 and 10, inclusive, and store it in the variable $randomNumber
. The value of $randomNumber
will then be echoed to the screen.
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站