php 의 난수 생성기
you can use rand() function for that in php.
Example:
Generate random numbers between 1 to 50
<?php
echo rand(1,50);
?>
php 임의의 문자열
function rand_str() {
$characters = '0123456789-=+{}[]:;@#~.?/>,<|\!"£$%^&*()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$randomstr = '';
for ($i = 0; $i < random_int(50, 100); $i++) {
$randomstr .= $characters[rand(0, strlen($characters) - 1)];
}
return $randomstr;
}
php 난수 생성기
<?php
echo rand(1,50);
?>
php 랜드 int
random_int ( int $min , int $max );
php 임의의 정수
echo random_int(0,50);
php 난수
rand(0,10);
or
random_int(0,10)
php 랜덤
mt_rand(1000, 9999)