I am having a problem where by when I try and generate numbers randomly with either mt_rand or rand (on a larger scale) I get no result at all. This used to work fine on my server but there seems to be issues now and I am unsure why.
<?php
echo 'Your number is: '.rand(0, 99999999999999999999);
?>
Where as it I update it to something like (using a 9 digit number):
<?php
echo 'Your number is: '.rand(0, 999999999);
?>
the lower example will work fine. I have recently changed my server version PHP 7.0. Is there a way to increase the maximum number or a better way to be doing this? Thanks.
Aucun commentaire:
Enregistrer un commentaire