// $min and $max are optional rand($min,$max);
<?php echo rand(1,50); ?>
rand(0,10); or random_int(0,10)